Children of fork() Cannot pthread_create()?

Roy Pledge Roy.Pledge at freescale.com
Wed Nov 14 14:00:35 PST 2007


We are in in process of upgrading some existing code to uClibc 0.9.29 and I'm 
encountering the issue described in 
http://www.uclibc.org/lists/uclibc/2007-June/018072.html

Given this behaviour, how should one create a multi-threaded daemon? Basically 
our code is calling daemon() and later will use pthread_create() to create 
threads based on connections to a socket.

One option would be to use fork() instead of pthread_create(), but I'm hoping 
someone will have a less intrusive solution.  The current implementation assumes 
a shared memory space, so using fork() would require some rework of the application.

Thanks in advance

Roy


More information about the uClibc mailing list