News for hackers. Stuff that matters.
Re:Beej's Guide to Unix Interprocess Communication by jws on Sunday December 06, 2009 @12:22AM (#979210)
Also worth noting, in Mac OS X and other BSDs pipes are bidirectional. I assumed that was some Snow Leopard craziness, but it comes from System V.4 in 1988.

There must be a theological divide on the matter judging from the wording of the GNU man page which proudly proclaims pipes unidirectional.

Re:Beej's Guide to Unix Interprocess Communication by prodigal_erik on Sunday December 06, 2009 @02:34AM (#979300)
shutdown(2) lets you report EOF while still reading from a socket, so you can cleanly receive your peer's messages and EOF. Pipes only support close(2), so you can't report EOF without forcing your peer to handle SIGPIPE/EPIPE as well as ignoring anything else they want to send. And if your peer is writing and doesn't expect reads to work also (POSIX doesn't call for it), your own writes are just going to block and never be read.