OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
CVS: cvs.openbsd.org: src

From: Miod Vallat (miodcvs.openbsd.org)
Date: Fri Oct 03 2003 - 11:38:04 CDT


CVSROOT: /cvs
Module name: src
Changes by: miodcvs.openbsd.org 2003/10/03 10:38:03

Modified files:
        sys/kern : sys_pipe.c
        sys/sys : pipe.h

Log message:
Bring several fixes from FreeBSD to our current pipe implementation:
- when allocating or growing a pipe buffer is not possible, do not panic
but report the error and handle it correctly. (1.73)
- "The pipe_write() code was locking the pipe without busying it first
in certain cases, and a close() by another process could potentially rip
the pipe out from under the (blocked) locking operation." (from Al Viro,
1.81)
- "Remove test in pipe_write() which causes write(2) to return EAGAIN
on a non-blocking pipe in cases where select(2) returns the file
descriptor as ready for write. This in turns causes libc_r, for
one, to busy wait in such cases.
Note: it is a quick performance fix, a more complex fix might be
required in case this turns out to have unexpected side effects."
(1.141)