[issue23618] PEP 475: handle EINTR in the socket module

STINNER Victor report at bugs.python.org
Mon Mar 9 16:43:24 CET 2015


STINNER Victor added the comment:

> http://www.madore.org/~david/computers/connect-intr.html

This article contains a program connect_test.c to test how connect() behaves on EINTR. Since it's in the public domain, I attached a copy.

The program contains the comment: "All systems function as expected when TEST_TWO is set."

If TEST_TWO is defined, poll() is used to wait until the socket is writable, and then getsockopt(SO_ERROR) is used to check if the error is now zero, when connect() fails with EINTR.

----------
Added file: http://bugs.python.org/file38411/connect_test.c

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


More information about the Python-bugs-list mailing list