On 10/28/2010 12:08 PM, Markus Duft wrote: > On 10/28/2010 12:03 PM, James Youngman wrote: > [snip] >> In so far as we're likely ever to fix this problem I'd be inclined to >> go for the 32K limit that Eric suggested. And perhaps treating >> ENOMEM like E2BIG when execve fails, for Interix. > > mhm - that'd be ok with me. > > another solution that came to my mind: i'm maintaining a library, who's sole > purpose is to fix the incorrect behaviour of libc in some regards on interix > (libsuacomp [1]). it does some "bad" things already ( ;p ), so maybe i could > override the sysconf() function (it already overrides approx 70 > functions...), and make it return a sane value in the _SC_ARG_MAX case. that > would make the whole problem disappear, and even the first (pushed) patch > unnecessary.
i implemented this, thus findutils can continue like before :) so the previous (already pushed) patch is no longer necessary (sorry for consuming your time...). actually, the patch is now harmfull, as _SC_ARG_MAX is now the only source of "good" information... :[ i will still keep an eye on it on my interix boxes whether this works in all situations. this is IMHO the best solution, as it takes the responsibility from findutils to work around existing OS bugs, when there is a library, doing this exact thing. there is not even a need to make findutils know libsuacomp, as suacomp installs a libc.so and libc.a linker scripts into it's prefix. as soon as this path is in the linker path, it works (and in gentoo prefix on interix i have linker and compiler wrappers assuring this). sorry, that i didn't have that idea earlier, would have saved some work for all of us. are you ok with this solution? markus > > what do you think? > > [1] http://sf.net/projects/suacomp > > markus > >> >> James. > >