Children of fork() Cannot pthread_create()?

David Daney ddaney at avtrex.com
Thu Jun 7 09:31:10 PDT 2007


Rob Landley wrote:
> On Wednesday 06 June 2007 4:19 pm, David Daney wrote:
>> Daniel Jacobowitz wrote:
>>> On Wed, Jun 06, 2007 at 01:04:09PM -0700, David Daney wrote:
>>>> Yes, pthread_create is not on the list of functions that can be called 
>>>> after a fork (but before exec).
>>>>
>>>> The list of functions is near the end of this document:
>>>>
>>>>
> http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_04.html
> 
> That's about signal handling.
> 

Of course it is.  It just turns out that the set of async-signal safe 
functions are also those likely to be safe to use in the child process 
after a fork from a multi-threaded program.

David Daney


More information about the uClibc mailing list