Date: Thu, 9 Apr 1998 15:07:06 +0300 (IDT) From: Eli Zaretskii To: firewind cc: djgpp AT delorie DOT com Subject: Re: Executing a program and obtaining its return value In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.