www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/09/10:50:23

Date: Thu, 9 Apr 1998 15:07:06 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: firewind <firewind AT metroid DOT dyn DOT ml DOT org>
cc: djgpp AT delorie DOT com
Subject: Re: Executing a program and obtaining its return value
In-Reply-To: <Pine.LNX.3.95.980408211218.234B-100000@metroid.dyn.ml.org>
Message-ID: <Pine.SUN.3.91.980409150252.24662A-100000@is>
MIME-Version: 1.0

On Wed, 8 Apr 1998, firewind wrote:

> Well, almost; system() returns whatever the command processor returns, which
> may or may not be what the executed program returned. MS-DOS's 'command.com,'
> for instance, is infamous for providing not-quite-accurate return codes.

That is one of the reasons that DJGPP's implementation of `system' 
doesn't call `command.com' unless it absolutely has to.  `command.com' is 
too dumb, so it is only called to run batch files and commands which are 
internal to `command'com'.  Even when presented with an internal command, 
DJGPP's `system' looks along the PATH for an external program by that 
name so you could easily install replacements for internal commands like 
`del' and `dir'; only if that search fails, it will summon `command.com' 
to do the job.

- Raw text -


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