3 ms·
An easy counterargument is that sockets support out of band read operations: for example, I can call getsockname() on a socket to obtain meaningful information
by jcalvinowens 3y ago
An easy counterargument is that sockets support out of band read operations: for example, I can call getsockname() on a socket to obtain meaningful information about it after shutdown(). Pipes have no such analogue.
Also, it's a general interface. It's easy to imagine exotic protocols where shutdown() is not so cleanly equivalent to close() as it is for TCP.
TBH I find it odd to focus on a preference for one semantic over the other. The real thing we can all probably agree on is that in a perfect world, they ought to be the same.