Re: fork and pthreads
Re: fork and pthreads
- Subject: Re: fork and pthreads
- From: "Stephen J. Butler" <email@hidden>
- Date: Mon, 18 Nov 2013 01:01:19 -0600
I don't know of an official document that states this, but on OS X the common wisdom has been you can have:
1) multithreaded program without fork()*
2) single threaded program with fork()**
But you can't have both of those. The man page you linked to is for True64 UNIX, the OS X man page for pthread_atfork() is much smaller and warns that what you want to do is not safe.
* ignoring the fork + async-signal-safe + exec
** technically, even this isn't safe, but many programs get away with it by only using the POSIX APIs (nothing Carbon or CoreFoundation before fork())
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden