[docs] [issue6774] socket.shutdown documentation: on some platforms, closing one half closes the other half
report at bugs.python.org
Thu Jan 12 20:48:01 CET 2012
Charles-François Natali <neologix at free.fr> added the comment:
> I was scared by the note in the documentation and wondered if the
> socket Python API was completely incapable of handling half-closed
> connections cross platform.
> It makes it half-closed as it should
Indeed. Calling shutdown(SHUT_WR) doesn't close the other end (which doesn't make much sense), it just sends a FIN (or RST depending on the context). 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).
I also find this note confusing and scary for no good reason, and since I don't think we should document every OS idiosyncrasies, it would probably be better to revert it.
I'll leave this open for a couple days to see if anyone objects, otherwise I'll revert it.
resolution: accepted ->
status: closed -> open
Python tracker <report at bugs.python.org>
More information about the docs