[issue7995] On Mac / BSD sockets returned by accept inherit the parent's FD flags

Antoine Pitrou report at bugs.python.org
Sun Nov 21 14:43:11 CET 2010


Antoine Pitrou <pitrou at free.fr> added the comment:

It seems to me that it's a reasonable request. There is indeed a bug, since Python uses non-blocking sockets to implement its "timeout" feature, and flags inheritance means Python's view of whether the socket is non-blocking is not in sync with reality on the OS side.

I think the patch should be opt-out rather than opt-in: that code path should probably be enabled for everything but Linux (and Windows?).

Another possibility is to force inheritance of flags, such that an accept()ed socket inherits the timeout settings of its parent (even under Linux).

----------
nosy: +pitrou
versions: +Python 3.1 -Python 2.6

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


More information about the Python-bugs-list mailing list