Date: Fri, 9 Jan 1998 19:45:37 -0600 (CST) From: Alex Nash <nash@mcs.net> To: nathan@rtfm.net Cc: freebsd-current@freebsd.org Subject: Re: Non-Posixly Correct pipe() and socketpair() Message-ID: <199801100145.TAA25178@nash.pr.mcs.net> In-Reply-To: <19980109191945.48808@rtfm.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 9 Jan, Nathan Dorfman wrote: > Here's a quick question that arose in #unix yesterday. Why does FreeBSD > have a bi-directional pipe() call when socketpair() does exactly this? > What benefits does making pipe() bi as well have? Doesn't this break POSIX > and introduce a new generation of Berkeleyisms? IEEE 1003.1 1996 states the following in section B.6.1: An implementation that fails write() operations on fildes[0] or read()s on fildes[1] is not required. Historical implementations (Version 7 and System V) return the error [EBADF] in such cases. This allows implementations to set up a second pipe for full duplex operation at the same time. A conforming application that uses the pipe() function as described in POSIX.1 will succeed whether this second pipe is present or not. Alex
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801100145.TAA25178>