Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!caip!sri-spam!parcvax!hplabs!pyramid!decwrl!wecker@cookie.dec.com From: wecker@cookie.dec.com (DAVE TANSTAAFL WECKER) Newsgroups: net.micro.amiga Subject: Re: creating sub process (from Matt Dillon) Message-ID: <5082@decwrl.DEC.COM> Date: Sun, 31-Aug-86 20:42:30 EDT Article-I.D.: decwrl.5082 Posted: Sun Aug 31 20:42:30 1986 Date-Received: Mon, 1-Sep-86 18:57:45 EDT Sender: daemon@decwrl.DEC.COM Organization: Digital Equipment Corporation Lines: 26 > ... > Along the same lines, I think it would be a good idea to include in > the DOS library a function similar to the Execute() call, but: > > (a) you can give it Output AND Input file handles > (b) that has NOTHING to do with a CLI.... > (c) That gives the return value from the executed command. > > ... > -Matt Here Here!! I spent an equivalent amount of time trying to write a MAKE for my system (too cheap to buy it from Manx :-) and found that Execute() was pretty useless, since you couldn't get back an exit status. What I wound up doing was an fexecv() (which does seem to work on both C and "standard" commands) and then doing a wait() (notice lower case) to get the returned status. Without this, there was no way for the "make" to recognize that a command had failed and merrily go on and link/compile dependant modules. I really hate having to parse my own command lines (maybe Matt's shell will take care of that for me (when I finally get a copy) ;-). For now it's good enough but the function described above would be REAL useful. dave decwrl!cookie.dec.com!wecker