freebsd-dev/lib/libc_r
ru 5ff7ea2228 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 Add an implementation of _atomic_lock for sparc64. This was submitted by 2003-01-05 22:23:11 +00:00
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 Fix a couple of minor nits that prevented this from compiling. 2002-07-02 01:26:16 +00:00
uthread If an application closes one of its stdio descriptors (0..2), 2003-05-31 05:20:44 +00:00
Makefile Zap now-unused SHLIB_MINOR 2002-09-28 00:25:32 +00:00