patch for threads/76690 - critical - fork hang in child for -lc_r

Daniel Eischen deischen at
Wed Mar 2 15:48:10 GMT 2005

On Wed, 2 Mar 2005, Andriy Tkachuk wrote:

> Hi folks.
> I spent some time on the problem in $subj and found some
> solution that seems to be working but i'm not sure about it's
> architectural correctness because libc was changed little bit ;)

This is already fixed in libpthread in both -current and -stable.
Your patch also pollutes the application namespace with a global
symbol thread_lock -- there is already a symbol in malloc.c that
is there just for this purpose (__malloc_lock).  See how libpthread
uses __malloc_lock and reinitializes the spinlocks in thr_kern.c

Is there a reason you are still using libc_r?


More information about the freebsd-threads mailing list