freebsd-dev/lib/libthr
Konstantin Belousov 1c70d00733 Right now, the rtld prefork hook locks the rtld bind lock in the read
mode.  This allows the binder to be functional in the child after the
fork (assuming no lazy loading of a filter is needed), but other rtld
services which require write lock on rtld_bind_lock cause deadlock, if
called by child.

Change the _rtld_atfork() to lock the bind lock in write mode, making
the rtld fully functional after the fork.

Pre-resolve the symbols which are called by the libthr' fork()
interposer, since dynamic resolution causes deadlock due to the
rtld_bind_lock already owned in the write mode.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2014-05-24 10:23:06 +00:00
..
arch Merging of projects/armv6, part 2 2012-08-15 03:08:29 +00:00
support Merge from tbemd, with a small amount of rework: 2010-09-13 01:43:10 +00:00
sys __error could be called too early before libthr is initialized, test 2006-07-12 03:44:05 +00:00
thread Right now, the rtld prefork hook locks the rtld bind lock in the read 2014-05-24 10:23:06 +00:00
libthr.3 mdoc: order prologue macros consistently by Dd/Dt/Os 2010-04-14 19:08:06 +00:00
Makefile Use src.opts.mk in preference to bsd.own.mk except where we need stuff 2014-05-06 04:22:01 +00:00
pthread.map Add accept4() system call. 2013-05-01 20:10:21 +00:00