Date: Mon, 15 Sep 1997 15:02:31 +0300 (IDT) From: Eli Zaretskii To: Robert Hoehne cc: Oberhumer Markus , DJGPP workers Subject: Re: c1args.c patches In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Mon, 15 Sep 1997, Robert Hoehne wrote: > for the limitet ARG_MAX _before_ examining the commandline. That > means, if the environment size is larger than 2048 bytes xargs > will exit with the "environment is too large for exec" message Correct. > > A better way would be to change `sysconf' so that it returns the actual > > size of the transfer buffer. It's a trivial change, so now seems like a > > This might be good but not helpfull for xargs, since it doesn't use > it (or have I overlooked something?) You have overlooked that ARG_MAX is a macro that calls `sysconf'. Look at the beginning of xargs.c > > I think this is wrong, because the transfer buffer may be stubedited to > > make it less than that. If anything, you should make the limit > > *smaller* (2K), not larger. Enlarging it is unsafe. > > But remember. If you set ARG_MAX to 2048 xargs will never work, > since it substracts from ARG_MAX 2048 and if the resulting value > <= 0 it aborts. Right, that's why I have left it as it is, even though 4K is a left-over from v1.x. I think patching `sysconf' is the way to go.