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

Daniel Eischen deischen at freebsd.org
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
(_kse_single_thread()).

Is there a reason you are still using libc_r?

-- 
DE



More information about the freebsd-threads mailing list