Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Dec 1994 13:50:07 +0100 (MET)
From:      j@uriah.sax.de (J Wunsch)
To:        freebsd-hackers@freefall.cdrom.com
Subject:   Re: fork() in unistd.h
Message-ID:  <199412281250.NAA07747@bonnie.tcd-dresden.de>
In-Reply-To: <199412280206.TAA16982@seagull.rtd.com> from "Don Yuniskis" at Dec 27, 94 07:06:49 pm

next in thread | previous in thread | raw e-mail | index | archive | help
As Don Yuniskis wrote:
| 
| Greetings!
|    /usr/include/unistd.h for 1.1.5.1R contains two (conflicting)
| prototypes for fork().  One is conditional on POSIX... should
| the other be inversely conditioned?  Or, removed altogether??

conflicting?  i've only noticed the conflict between fork() and vfork().

Anyway, the real reason is that Posix requires fork() to return a
pid_t, while the kernel internally (traditionally) uses an int for the
PID.  So int would be the proper return type from the kernel POV, but
pid_t from the Posix view.

Change your unistd.h to pid_t, and live with it for 1.1.5.1.
-- 
cheers, J"org                             work:      --- no longer ---
                                          private:   joerg_wunsch@uriah.sax.de

Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199412281250.NAA07747>