freebsd-skq/lib/libc_r
ru 1c938f7a9e If an application closes one of its stdio descriptors (0..2),
an excessive close() on one of these descriptors would cause
a memory for this descriptor to be allocated in the internal
descriptor table.  When this descriptor gets used again, e.g.
through the call to open() or socket(), the descriptor would
be erroneously left in the blocking mode, and the whole
application would get stuck on a blocking operation, e.g.,
in accept(2).

Prevent this bug from happening by disallowing close() against
non-active descriptors (return -1 and set errno to EBADF in
this case).

Reviewed by:	deischen
Approved by:	re (scottl)
2003-05-31 05:20:44 +00:00
..
arch
man mdoc(7) fixes. 2003-05-24 19:53:08 +00:00
sys remove #ifdef _THREAD_SAFE 2003-01-24 01:46:30 +00:00
test
uthread If an application closes one of its stdio descriptors (0..2), 2003-05-31 05:20:44 +00:00
Makefile