🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Execute -- What does it always return -1?

#13535
From: Ian Carmichael
Date: Sun, 04 Feb 1990 20:59
25 lines
879 bytes
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?

caller.c
--------
main()
{
	int success;
	success = Execute ("callee",0,0);
	printf("Success = %d\n",success);
}

callee.c
--------
#define N 0
main()
{
	printf("Callee Exiting with return code %d\n",N);
	exit(N);
}

Thanks in advance,
Ian Carmichael
Technical Details
Message-ID: <541@qusunb.queensu.CA>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!qucis!cmichael

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!qucis!cmichael
From: cmichael@qucis.queensu.CA (Ian Carmichael)
Newsgroups: comp.sys.amiga.tech
Subject: Execute -- What does it always return -1?
Keywords: amigados dos execute
Message-ID: <541@qusunb.queensu.CA>
Date: 4 Feb 90 20:59:55 GMT
Organization: Queen's University, Kingston, Ontario, Canada
Lines: 25