Date: Fri, 18 May 2001 23:26:59 +0300 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: "Tim Van Holder" 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: Subject: Re: Possible bash issue References: 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 Precedence: bulk > From: "Tim Van Holder" > 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.)