bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: findutils on interix


From: Markus Duft
Subject: Re: findutils on interix
Date: Thu, 28 Oct 2010 08:33:04 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.9) Gecko/20100913 Lightning/1.0b3pre Thunderbird/3.1.3

On 10/28/2010 01:20 AM, Eric Blake wrote:
> On 10/27/2010 05:12 PM, James Youngman wrote:
>>
>>> AFAIK, the maximum environment size
>>> on interix is 32K, if that's of any interest to you...
>>
>> Does it express the size of this limit in a way that's relevant to the
>> POSIX programming interface?
> 
> Windows in general has a 32k limit on arguments, and a separate 32k
> limit on environment vars.  Unlike on Unix, these are separate pools, so
> a large environment has no effect on command line argument length.
> 
> I don't know how well this plays into Interix.

i guess, those are the "very hard" limits on interix then :)

through trial and error, i found out that with a 3K environment, 50K seems to 
work well, which seems rather odd then - as arguments would be 47K in the worst 
case then, right?

i have no idea how we could be able to reliably find a "real" limit on interix, 
other than a configure check which tries to exec until it works... however, the 
check would need to grow the env to the maximum, too.

as "start values" the check could use the same as the arg_max init stuff 
(sysconf(_SC_ARG_MAX) or ARG_MAX, whichever is bigger), and then decrease them 
until it works.

thoughts?

> 
> When building for cygwin, I use with ./configure
> DEFAULT_ARG_SIZE='(32u*1024)', which sets an overall 32k limit for both
> args and environment (as reporting 64k would be lying, since the two
> pools are not shared).  Perhaps that will work for Interix as well?

i guess not. as soon as i get above 51K, things start to go wrong, regardless 
of env size, etc.

thanks for all the help guys!
markus

> 
> But cygwin is unique in that it has unlimited args and environment size
> when invoking another cygwin program (rather than go through the windows
> pools, cygwin processes use arbitrarily large shared memory for
> communicating between parent and child processes).  So cygwin only has
> to worry about hitting the 32k limits when invoking a non-cygwin program.
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]