Article View: comp.os.os2.programmer
Article #2132fork() fails in EMX...
From: ochealth
Date: Sat, 26 Sep 1992 07:12
Date: Sat, 26 Sep 1992 07:12
42 lines
1311 bytes
1311 bytes
can someone give me a sample of fork() in EMX?
I tried a simple program (and used the right EMX options) and it
didn't work (works on SunOS).
It prints:
15EC09F3:00000057(beeps)
fork failed
(actual PID) -1
I guess that's debug code. I'm sure I used the right gcc options.
#include <process.h>
main()
{
int pid;
if( pid = fork() ) {
if( pid == -1 )
puts("fork failed");
else
puts("parent");
}
else
puts("child");
printf("\n%d %d\n",getpid(),pid);
}
--
______________________________________________________________________________
jpm: ochealth@unixg.ubc.ca
Happily using OS/2 2.0 because MS Windows isNT ___
Insert VapourFeature ^^^
Technical Details
Message-ID:
<1992Sep26.071206.3535@unixg.ubc.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!wupost!usc!sol.ctr.columbia.edu!destroyer!ubc-cs!unixg.ubc.ca!ochealthShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!wupost!usc!sol.ctr.columbia.edu!destroyer!ubc-cs!unixg.ubc.ca!ochealth From: ochealth@unixg.ubc.ca (ochealth) Newsgroups: comp.os.os2.programmer Subject: fork() fails in EMX... Message-ID: <1992Sep26.071206.3535@unixg.ubc.ca> Date: 26 Sep 92 07:12:06 GMT Sender: news@unixg.ubc.ca (Usenet News Maintenance) Organization: University of British Columbia, Vancouver, B.C., Canada Lines: 42 Nntp-Posting-Host: unixg.ubc.ca