2011/3/27 Timo Teräs <[email protected]>: > On 03/27/2011 10:21 PM, Rich Felker wrote: >> On Sat, Mar 26, 2011 at 08:28:04PM +0200, Timo Teräs wrote: >>> Otherwise other threads can leave malloc state locked, and the child >>> will hang indefinitely if it tries to malloc something. >> >> This change by itself breaks as much as it fixes, unless the mutex >> implementation is reentrant and recursive. fork() is specified to be >> async-signal-safe, which means it's legal for a signal handler to call >> fork() while malloc() is being executed. With your patch, this will >> hang the program. > > Doing fork from signal handler seems utterly stupid. That would need > extra precautions to work properly, because the malloc code is not > re-entrant.
stupid or not, if POSIX says it's required to be supported, then we have to support it -mike _______________________________________________ uClibc mailing list [email protected] http://lists.busybox.net/mailman/listinfo/uclibc
