freebsd-dev/libexec
John Polstra cf98e66403 Fix a bug which could cause programs with user threads packages to
lock against themselves, causing infinite spinning.  Brian Feldman
found this problem when testing with Mozilla and supplied the fix,
which I have revised slightly.

Here is the failure scenario.  A thread calls dlopen() and acquires
the writer lock.  While the thread still holds the lock, a signal
is delivered and caught.  The signal handler tries to call a function
which hasn't been bound yet.  It thus enters the dynamic linker
and tries to acquire the reader lock.  Since the writer lock is
already held, it will spin forever in the signal handler.  The
thread holding the lock won't be able to progress and release the
lock.

The solution is to block almost all signals while holding the
exclusive lock.

A similar problem could conceivably occur in the opposite order.
Namely, a thread is holding the reader lock and then a signal
handler calls dlopen() or dlclose() and spins waiting for the writer
lock.  We deal with this administratively by proclaiming that signal
handlers aren't allowed to call dlopen() or dlclose().  Actually
we don't have to proclaim a thing, since signal handlers aren't
allowed to call any system functions except those which are explicitly
permitted.

Submitted by:	Brian Fundakowski Feldman <green>
2000-07-17 17:18:13 +00:00
..
atrun Don't uselessly set MANDEPEND (it isn't used in this Makefile, and isn't 2000-05-15 15:01:13 +00:00
bootpd
comsat
fingerd Support logging for IPv6 remote host. 2000-02-18 07:08:03 +00:00
ftpd Explain that the -S option only logs file downloads, not all transfers. 2000-07-11 11:42:29 +00:00
getNAME
getty Changed setflags() to set_flags(). This fixes world breakage due to 2000-01-28 07:12:03 +00:00
mail.local
makekey
mknetid
named-xfer
pppoed
rbootd
revnetgroup Don't call err() without a format string. 2000-07-11 23:53:22 +00:00
rexecd Man page fixups 2000-05-15 14:06:07 +00:00
rlogind Use libcrypto instead of libdes. 2000-02-24 21:18:08 +00:00
rpc.rquotad Fix various man pages to stop abusing the .Bx macro to generate the 2000-01-23 02:18:19 +00:00
rpc.rstatd
rpc.rusersd
rpc.rwalld
rpc.sprayd
rshd Plug the hole where rshd would bypass a proper .rhosts check if the 2000-07-05 17:47:17 +00:00
rtld-aout Move the man pages for the a.out dynamic linker into the 1aout 2000-01-29 03:13:49 +00:00
rtld-elf Fix a bug which could cause programs with user threads packages to 2000-07-17 17:18:13 +00:00
smrsh
talkd
telnetd Minor mdoc cleanup. 2000-05-05 02:21:45 +00:00
tftpd
uucpd IPv6 support. 2000-05-14 18:01:05 +00:00
xtend
ypxfr Spelling fix: transfered --> transferred 2000-06-02 21:22:09 +00:00
Makefile Wrap uucpd behind the NOUUCP knob. 2000-03-24 18:21:09 +00:00
Makefile.inc