www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/12/17/09:06:38

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-workers-bounces using -f
Date: Mon, 17 Dec 2001 15:47:39 +0200 (WET)
From: Andris Pavenis <pavenis AT lanet DOT lv>
X-Sender: pavenis AT ieva06
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Cc: Tim Van Holder <tim DOT van DOT holder AT pandora DOT be>, djgpp-workers AT delorie DOT com
Subject: Re: Weird system() thing (was Re: The Bash 2.05 fixinc.sh bug)
In-Reply-To: <Pine.SUN.3.91.1011217093856.19544C-100000@is>
Message-ID: <Pine.A41.4.05.10112171546500.21590-100000@ieva06>
MIME-Version: 1.0
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


On Mon, 17 Dec 2001, Eli Zaretskii wrote:

> > > after
> > > that shell is exited, the following does not:
> > > 
> > > int
> > > main(void)
> > > {
> > >   system("");
> > >   system("Foo=bar");
> > > }
> > 
> > I guess Your executable were named foo.exe. 
> >                                    ========
> 
> That could indeed explain the problem, but then why didn't the
> previous example, the one with a single system("Foo=bar"), cause the
> same infinite series of subprogram invocations?
> 

Maybe the first one were called differently 
 
> > As far as I tested system ("Foo=bar") is interpretted as
> > 'Foo "=bar"' 
> 
> This interpretation is in COMMAND.COM, not in `system': an unquoted
> `=' characters is treated as a delimiter by COMMAND.COM.  (Old
> versions of COMMAND.COM, such as the one in DOS 5.0, don't support
> quoting, so `=' is _always_ a delimiter there.)
> 
> (COMMAND.COM is in this example invoked by `system' because it doesn't
> find a program called `Foo=bar', with or without an executable
> extension.)
> 
> 
> 



- Raw text -


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