threads/101323: fork(2) in threaded programs broken.

Daniel Eischen deischen at freebsd.org
Thu Aug 3 17:51:54 UTC 2006


On Thu, 3 Aug 2006, Poul-Henning Kamp wrote:

> 	Forking a threaded process and starting a thread in the
> 	child process does not work.
>
> 	Tested on -current and releng_6 and both fails with more or
> 	less the same error message:
>
> 	Fatal error 'mutex is on list' at line 540 in file
> 	    /usr/src/lib/libpthread/thread/thr_mutex.c (errno = 0)

fork()ing from a threaded process and making calls to functions
other than those defined as async-signal-safe is not allowed 
by POSIX.  libpthread intentionally doesn't support this.

-- 
DE


More information about the freebsd-threads mailing list