[Top][All Lists]

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

Re: I: [PATCH] findutils-4.2.3: xargs arg_size

From: James Youngman
Subject: Re: I: [PATCH] findutils-4.2.3: xargs arg_size
Date: Mon, 8 Nov 2004 00:04:36 +0000
User-agent: Mutt/1.3.28i

On Sat, Nov 06, 2004 at 03:16:32AM +0300, Dmitry V. Levin wrote:
> Hi,
> Your change to fix so called "xargs enviroment size limited to 20k"
> problem still limits default size of environment reserved for command
> and its arguments to 20k.  All modern OSes including linux support larger
> ARG_MAX values (e.g. old linux-2.2.x defines ARG_MAX to 128k) but xargs
> by default can use only 20k.  Attached patch simply increases default
> limit for arg_max to 128k + size of environment.

Thanks.  That would be useful on many systems.  Unfortunately it would
not be POSIX compliant.  Actually, I'm not sure the old implementation
was, either.  Never mind.  I have installed the following patch, which
does what you had in mind an a POSIX-compliant way, I think.  

The end result is that we use a 128Kb buffer, or less if the OS
doesn't support that much.  This value can still be adjusted up or
down with he use of the "-s" option. 

I did some testing a while ago, which appeared to demonstrate that a
20K command line was more or less the most efficient choice on the
particular machine I was testing.  However, since the limit we are
talking about cannot be exceeded even for a single very large
filename, increasing the limit seems sensible to me.


Attachment: arg-size-patch.txt
Description: Text document

reply via email to

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