delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/05/18/16:29:45

Date: Fri, 18 May 2001 23:26:59 +0300
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Sender: halo1 AT zahav DOT net DOT il
To: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
Message-Id: <5137-Fri18May2001232658+0300-eliz@is.elta.co.il>
X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9
CC: djgpp-workers AT delorie DOT com, snowball3 AT softhome DOT net
In-reply-to: <CAEGKOHJKAAFPKOCLHDIMEFPCDAA.tim.van.holder@pandora.be>
Subject: Re: Possible bash issue
References: <CAEGKOHJKAAFPKOCLHDIMEFPCDAA DOT tim DOT van DOT holder AT pandora DOT be>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
> Date: Fri, 18 May 2001 19:51:43 +0200
> 
>   testring="ABCDEF"
>   while test `$CONFIG_SHELL $0 --fallback-echo "X$testring" >/dev/null 2>&1`
> == `echo "X$testring" >/dev/null 2>&1` &&
>      new_result=`expr "X$testring" : ".*" 2>&1` &&
>      lt_cv_sys_max_cmd_len=$new_result &&
>      test $i != 32 # 1 MB should be enough
>   do
>     i=`expr $i + 1`
>     testring=$testring$testring
>   done
[snip]
> Also, isn't the transfer buffer supposed to be an upper limit to
> the number of arguments, or is that only when invoking DOS apps?

Yes, the transfer buffer (minus the size of the environment) is the
limit when invoking DJGPP programs (DOS programs have their usual
126-char limit).  But IIRC there's one exception: when Bash invokes
Bash (or some other Unixy shell).  I think if you step through the
code, you will see that Bash calls `system' (perhaps via `popen'), and
`system' invokes Unixy shells via a disk file, like this:

	 sh disk-file

where disk-file holds the entire command line.  Clearly, when invoked
like this, the sky is the limit ;-)

In other words, to be effective, this test should invoke some other
DJGPP program, not a shell.  (But perhaps someone should actually step
through the code as Bash runs it and make sure my feeble memory
doesn't fail me, before we draw any conclusions.)

- Raw text -


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