On Jan 27, 2004, at 1:16 PM, Steve Atkins wrote:
A hint, though, might be that it's a multiprocess application with a
single master process that controls dozens of child processes. When the
master shuts down it asks all the children to shut down, and then it
deadlocks in the SIGCHILD handler.

It's not safe to do anything interesting in a SIGCHLD handler, unless you have pretty severe restrictions on when the signal can arrive. Take a look at <http://www.opengroup.org/onlinepubs/007904975/functions/ xsh_chap02_04.html>. It contains a list of all the async signal-safe functions in SUSv3. It's a pretty short list. Notably absent are pthread_mutex_*() and malloc() (and anything that uses them).


Scott Lamb


---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to