[issue7995] On Mac / BSD sockets returned by accept inherit the parent's FD flags
Antoine Pitrou
report at bugs.python.org
Sun Jan 2 17:06:39 CET 2011
Antoine Pitrou <pitrou at free.fr> added the comment:
I've tried the patch under OpenSolaris and the test fails (EAGAIN),
meaning that accept() semantics there are the same as under BSD:
======================================================================
ERROR: testInheritFlags (test.test_socket.NonBlockingTCPTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/antoine/vbox/py3k/cc/Lib/test/test_socket.py", line 983,
in testInheritFlags
message = conn.recv(len(MSG))
socket.error: [Errno 11] Resource temporarily unavailable
I think the code path in the patch should be opt-out rather than opt-in:
that is, it should be executed if HAVE_FCNTL, O_NONBLOCK are defined,
and if not under Linux.
(and I don't think O_ASYNC is useful here, is it?)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7995>
_______________________________________
More information about the Python-bugs-list
mailing list