bug-findutils
[Top][All Lists]
Advanced

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

Re: findutils on interix


From: James Youngman
Subject: Re: findutils on interix
Date: Thu, 28 Oct 2010 11:03:37 +0100

On Thu, Oct 28, 2010 at 10:44 AM, Markus Duft <address@hidden> wrote:
> On 10/28/2010 10:55 AM, James Youngman wrote:
>> On Thu, Oct 28, 2010 at 7:33 AM, Markus Duft <address@hidden> wrote:
>>> 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?
>>
>> This means we would have to give up any hope of supporting
>> cross-compilation with Interix as the target, or for that case simply
>> configure a known-working limit.   If we take the second option, we'll
>> have a limit that only applies in the cross-compilation case, which is
>> likely to produce an obscure bug further down the road.    I would
>> rather not leave any rarely-exercised cases at all.
>
> yeah, right - so either forbid cross compilation, or set hard limits based 
> upon my explorations...?

The problem with this is that we have no guarantee at all that the
limit will not change in a subsequent release of Interix.   Or indeed
vary on some other computer.    This is why having a correct ARG_MAX
and sysconf() is useful, as you pointed out.

> i vote for the hard limits. i know it's not good, but there is no chance 
> interix get's a hotfix in this regard either, so... and the limit is the same 
> for all windows and will prolly not change (at least in the next few years).
>
> redefining ARG_MAX in arg-max.h for interix to (64512 - 8192) does the trick. 
> for _some_ reason, it does not work to set it to the full 64K or even only 
> 60K... some system overhead must be hidden somewhere...
>
> (BTW. libtool has a hard coded limit for max command line argument length on 
> interix too (which is wrong too: 196608 (lol)), because determination is 
> seemingly impossible, and a fix very unlikely).

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.

James.



reply via email to

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