Path: utzoo!attcan!ncrcan!ziebmef!stephen From: stephen@ziebmef.uucp (Stephen M. Dunn) Newsgroups: comp.sys.ibm.pc Subject: Re: HELP: MSC system call Summary: getting return codes Message-ID: <1989May27.142613.21449@ziebmef.uucp> Date: 27 May 89 18:26:12 GMT References: <4267@druhi.ATT.COM> Reply-To: stephen@ziebmef.UUCP (Stephen M. Dunn) Distribution: comp Organization: Ziebmef Public Access Unix, Toronto, Ontario Lines: 22 In article <4267@druhi.ATT.COM> deln@druhi.ATT.COM (SloaneN) writes: $I'm having a problem with the return code from system(). What $appears to happen is that the return code (as the manual states) $indicates whether command.com could successfully execute the command $or not. How do I get the exit code of the spawned command? If you're trying to spawn some other program through a system call that first invokes COMMAND.COM, you're using the wrong system call. Don't ask me what the name of the one you want is, but there should be a call that directly runs your other program. If you're running a .COM or an .EXE, there is no need to go through COMMAND.COM. Besides which, COMMAND uses a few K of memory, so if you've only just got enough memory left, this might become important. Try looking through your C manual for another call (try FORK, it may be the one) that doesn't bother with COMMAND.COM. -- ------------------------------------------------------------------------------- ! Stephen M. Dunn stephen@ziebmef.UUCP ! DISCLAIMER: Who'd ever ! ! Take off to the Great White North eh, ya hosehead ! claim such dumb ideas? ! -------------------------------------------------------------------------------