🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #13640

Re: Execute -- Why does it always return -1?

#13640
From: Joe Smith
Date: Mon, 12 Feb 1990 08:48
21 lines
1727 bytes
In article <541@qusunb.queensu.CA> cmichael@qucis.queensu.CA (Ian Carmichael) writes:
>Does Execute always return -1?  In the following code, caller always
>prints "Success = -1", regardless of the value of N in callee.c, or even
>if callee does not exist.  Why?  What is "the right way" to get the 
>return code from Execute?

Execute returns TRUE (-1) if it able to initialize a new CLI process,
regardless of whether that CLI was able to run the specified command(s).
You can watch it fail if you type NEWCLI over and over until you have
20 CLIs in use.  Then your program will return FALSE (0) when it can't
create CLI #21.  

Since the CLI structure is deleted when the Execute()ed programs are done,
I don't think you can get the return value of the last command.

I hope they've added a function to do what you want in 1.4.
-- 
Joe Smith (408)922-6220 | SMTP: jms@tardis.tymnet.com or jms@gemini.tymnet.com
BT Tymnet Tech Services | UUCP: ...!{ames,pyramid}!oliveb!tymix!tardis!jms
PO Box 49019, MS-C41    | PDP-10 support: My car's license plate is "POPJ P,"
San Jose, CA 95161-9019 | humorous dislaimer: "My Amiga speaks for me."
Technical Details
Message-ID: <929@tardis.Tymnet.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!jarthur!bridge2!3comvax!tymix!tardis!jms
References: <541@qusunb.queensu.CA>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!jarthur!bridge2!3comvax!tymix!tardis!jms
From: jms@tardis.Tymnet.COM (Joe Smith)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Execute -- Why does it always return -1?
Summary: Execute returns 0 only if all 20 CLI's are in use
Keywords: amigados dos execute
Message-ID: <929@tardis.Tymnet.COM>
Date: 12 Feb 90 08:48:19 GMT
References: <541@qusunb.queensu.CA>
Reply-To: jms@tardis.Tymnet.COM (Joe Smith)
Organization: BT Tymnet, San Jose, CA
Lines: 21