[issue20611] socket.create_connection() doesn't handle EINTR properly

tholzer report at bugs.python.org
Mon May 26 04:58:56 CEST 2014


tholzer added the comment:

No problem, I've attached a patch for socket.py for Python 2.7.3.

A few notes:

getaddrinfo (and gethostbyname, etc.) are already immune to this bug, so I've just fixed the connect() call.

The socket does need to be closed after EINTR, otherwise a EINPROGRESS might get returned on subsequent connect() calls.

----------
Added file: http://bugs.python.org/file35359/socket_2.7.3_eintr_patch.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20611>
_______________________________________


More information about the Python-bugs-list mailing list