OS/X fork() officially broken?
jorgar at gmail.com
Wed Oct 3 13:22:35 MDT 2012
On 3 October 2012 12:04, Jeremy Allison <jra at samba.org> wrote:
> On Wed, Oct 03, 2012 at 04:11:33PM +0200, Volker Lendecke wrote:
>> Via the discussion thread on
>> https://lwn.net/Articles/518306/ I found the link to the
>> OS/X fork manpage:
>> Despite the link pointing at ios, the text says it is the
>> OS/X manpage for fork(2).
>> Look at the CAVEATS section. That is likely one of the more
>> technical reasons why Apple switched to something but Samba.
>> For us it does not make any sense at all to even try to
>> revive smbd on OS/X in its current architecture.
> Isn't that an iOS manpage, not an OS/X manpage ?
fork(2) is the same in both places.
> I can't believe they broke fork() so badly. It's a UNIX
> after all..
I believe that the most common problem in practice is that Mach ports
don't inherit to the child. There's a lot of stuff that depends on
Mach IPC and so it breaks mysteriously across fork. getpwnam etc
historically have done special fork handling (that might have even
been originally added for Samba). There might be other issues, but in
general ymmv ...
James Peach | jorgar at gmail.com
More information about the samba-technical