[Bug 210288] File descriptors created by pipe are both read/write

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Jun 17 16:38:39 UTC 2016


Jilles Tjoelker <jilles at FreeBSD.org> changed:

           What    |Removed                     |Added
                 CC|                            |jilles at FreeBSD.org

--- Comment #1 from Jilles Tjoelker <jilles at FreeBSD.org> ---
The FreeBSD man page pipe(2) clearly documents that pipes are bidirectional and
that this is not portable.

Bidirectional pipes were first introduced with STREAMS in System V release 4,
one of POSIX's source implementations, so POSIX would not disallow them. Since
SUSv3 and POSIX.1-2001, there has been explicit allowance in the "pipe" page:

> It is unspecified whether fildes[0] is also open for writing and whether
> fildes[1] is also open for reading.

I agree that this feature is somewhat questionable. It may hide bugs and its
deliberate use is more prone to deadlocks than unidirectional pipes are, but I
don't think it should be removed.

You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-bugs mailing list