Article View: comp.os.os2.programmer
Article #2212fork() fails in EMX...
From: Andreas Kaiser
Date: Wed, 30 Sep 1992 05:03
Date: Wed, 30 Sep 1992 05:03
23 lines
1006 bytes
1006 bytes
In article <1992Sep26.071206.3535@unixg.ubc.ca> ochealth@unixg.ubc.ca writes:
> can someone give me a sample of fork() in EMX?
/emx/test/fork.c
> if( pid = fork() ) {
> if( pid == -1 )
> puts("fork failed");
> else
> puts("parent");
> }
Add a dummy malloc() before fork() and it runs. A bug in the library.
EM's demo has a printf before fork and the very first stdio access
usually allocates some buffer memory.
Gruss, Andreas
:::::::::::::::::::: subnet: ak@ananke.stgt.sub.org
:: Andreas Kaiser :: fidonet: 2:241/7220.9
::::::::::::::::::::
Technical Details
Message-ID:
<717829433snx@ananke.stgt.sub.org>Path:
arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!Sirius.dfn.de!news.uni-stuttgart.de!delos!ananke!akReferences:
<1992Sep26.071206.3535@unixg.ubc.ca>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!Sirius.dfn.de!news.uni-stuttgart.de!delos!ananke!ak From: ak@ananke.stgt.sub.org (Andreas Kaiser) Newsgroups: comp.os.os2.programmer Subject: fork() fails in EMX... Message-ID: <717829433snx@ananke.stgt.sub.org> Date: 30 Sep 92 05:03:53 GMT References: <1992Sep26.071206.3535@unixg.ubc.ca> Organization: ananke Lines: 23