Mail Archives: djgpp-workers/2000/10/02/01:36:22
On Sun, 1 Oct 2000, Charles Sandmann wrote:
> Originally system() was failing, but I wasn't checking the return status.
> I changed the path, then system() worked. Then I changed the path to a
> simple failure example, and system() failed. It continued to fail when
> I put the path back to just c:\DOS
>
> I changed the system("command") to i = system("command.com") so I could
> check the return status, and it started working again.
Thanks. I have a few more questions (if you remember the answers ;-):
During this episode, was COMMAND.COM the only program you tried to
invoke? If not, what were the other programs?
Also, I understand that the failed cases had one invalid directory as
part of PATH, but otherwise PATH was correct, right? In particular, the
directory where COMMAND.COM resides was always part of the PATH, right?
"C:\DOS" is where you have COMMAND.COM on that machine, yes?
Finally, the invalid directory that was part of PATH, was it pointing to
an existing drive or to an invalid drive?
Btw, the ``normal'' failure mode of `system' is to print "Bad command or
file name", the message which comes from COMMAND.COM when `system' gives
up and passes the command line to it. Is that what you saw?
- Raw text -