home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!paladin.american.edu!howland.reston.ans.net!usc!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!umn.edu!csus.edu!netcom.com!netcomsv!terapin!paulk
- From: paulk@terapin.com (Paul Kienitz)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Error in AmigaDOS Execute() ???
- References: <1993Jan4.112435.29118@doug.cae.wisc.edu>
- Message-ID: <paulk.339k@terapin.com>
- Date: 4 Jan 93 17:31:13 PST
- Organization: BBS
- Lines: 22
-
- > I have been running into a problem with AmigaDos's Execute()
- > function. It returns a non-zero value even when trying to
- > Execute() a command that doesn't exist. How do I get the actual
- > return value and how do I find out if an error occured while using
- > Execute(). According to the documentation, Execute() returns a
- > NULL if unsuccessful.
-
- "Unsuccessful" in this context means only, unsuccessful at creating a
- child CLI to run the command string in. The results of the commands
- themselves are lost.
-
- If you need the return value, you can't use Execute. You have to use
- RunCommand or SystemTagList or, under 1.3, one of several various
- hacks such as the Aztec fexec functions or (I think) the arp.library
- SyncRun.
-
- Or you can try to hack up code to call the child program within your
- own process, but this means you have to do all your own work of finding
- and loading it ... but it's not impossible to write the equivalent of
- RunCommand under 1.3. The trickiest part is passing the argument line to
- BCPL programs. I happen to know how this is done ... (talking about
- wasting brain space on useless data)
-