delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/09/11/11:08:08

Date: Thu, 11 Sep 1997 18:05:36 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Robert Hoehne <robert DOT hoehne AT mathematik DOT tu-chemnitz DOT de>
cc: Oberhumer Markus <k3040e4 AT c210 DOT edvz DOT uni-linz DOT ac DOT at>,
djgpp-workers AT delorie DOT com
Subject: Re: c1args.c patches
In-Reply-To: <Pine.HPP.3.95q.970911141305.26019C-100000@newton.mathematik.tu-chemnitz.de>
Message-ID: <Pine.SUN.3.91.970911165510.13452C-100000@is>
MIME-Version: 1.0

On Thu, 11 Sep 1997, Robert Hoehne wrote:

> Oh No!! It is not the limited tarnsfer buffer but the way like
> xargs is designed. It is probaly the only program currently
> in use on DJGPP which examines the system limitation for the
> maximal argument lenght. And this is for DJGPP 4096!!

And what's wrong with this?  I have dwelled on this issue for quite a
while when I ported `xargs', but finally decided to leave it alone.  The
code in `xargs' uses up to 2KB (4096 - 2048) of arguments before it
decides that the command line is too long and should be divided into few
chunks. 

This is consistent with the DJGPP's minimum transfer buffer size of 2KB.

`xargs' also has a switch to make the limit other than the default, so if 
you need it, you can use it.

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 
good time to do that.

> -#define _POSIX_ARG_MAX		4096	/* but only for exec's to other djgpp programs */
> +#define _POSIX_ARG_MAX		16384	/* but only for exec's to other djgpp programs */

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019