[docs] [issue6774] socket.shutdown documentation: on some platforms, closing one half closes the other half

Nicolas Dumazet report at bugs.python.org
Thu Jan 12 22:16:22 CET 2012

Nicolas Dumazet <nicdumz at gmail.com> added the comment:

> It's the other end which decides to return ENOTCONN upon shutdown(SHUT_RD) on OS X, which is questionable
> (not sure it's against the BSD socket API, since shutdown(SHUT_RD) doesn't have any counterpart in the TCP layer).

Exactly. The same code raises a socket.error in one platform (mac os) and not on another (linux). Why not document this questionable behavior?

I'm sorry, I realize that my original patch was imprecise. I'm not an expert here, and I simply read http://svn.python.org/view/python/trunk/Lib/test/test_socket.py?r1=64125&r2=68611&pathrev=68611 . Ok, fine -- it doesn't close the other end per se, but shutdown(SH_RD) after a FIN on MacOS raises a socket.error . This is questionable, unexpected, and should be documented.

If possible, I'd like to push for a rewording instead of a revert.


Python tracker <report at bugs.python.org>

More information about the docs mailing list