Path: utzoo!censor!geac!torsqnt!hybrid!scifi!bywater!uunet!overload!dillon From: dillon@overload.Berkeley.CA.US (Matthew Dillon) Newsgroups: comp.sys.amiga.programmer Subject: Re: EXECUTE in C Message-ID: Date: 14 Jan 91 02:34:55 GMT References: <1991Jan12.062506.19754@marlin.jcu.edu.au> <652@caslon.cs.arizona.edu> Organization: Not an Organization Lines: 48 In article <652@caslon.cs.arizona.edu> dave@cs.arizona.edu (Dave P. Schaumann) writes: >> >> I'm writing a C program that calls the 2 cli commands copy >>and makedir. I'm using the call >> status = Execute("copy ...",0,0); >> and status = Execute("makedir ...",0,0); >> >> I was wondering if there was a way to return errors from the >>copy and makedir command. > > > fexecv() should be documented in your C manual. I was unable to find any >documentation on wait(); I figured out how to do this by poking around in the >source to Matt Dillon's shell (thanks, Matt). oh no! what a mess. First of all, the fexecv() stuff is a MANX hack. I have spent literally hundreds of hours over the years trying to do an fexecv() equivalent *right*, and there is no way to do. This is the one case for getting 2.0 up and running the moment it is released. Under 2.0, there are several new calls to load and run programs AND return the exit code, all nice and neat. There are also new calls for handling the resident list and running resident programs. All in all a shell-writer's dream. If you can help it, avoid fexecv() and other compiler-specific routines (lattice's fork/exec as well) and wait for 2.0 . >> Any help would be much appreciated. > >>Ross Milward - zlnem@marlin.jcu.edu.au > >Dave Schaumann | We've all got a mission in life, though we get into ruts; >dave@cs.arizona.edu | some are the cogs on the wheels, others just plain nuts. > -Daffy Duck. -Matt -- Matthew Dillon dillon@Overload.Berkeley.CA.US 891 Regal Rd. uunet.uu.net!overload!dillon Berkeley, Ca. 94708 USA