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

Martin v. Löwis report at bugs.python.org
Sun Nov 21 21:41:41 CET 2010


Martin v. Löwis <martin at v.loewis.de> added the comment:

> The Python implementation sets timeout=None (which implies that the
> underlying socket is blocking).

No, it doesn't. A socket may be non-blocking without having a timeout;
that's the socket API (on all systems, not just BSD).

> The problem is that it has.   It has created a new Python socket
> object with a specific value for timeout (None), but the underlying
> socket is nonblocking.
> 
> The docs state that timeout = None makes the socket blocking.

What specific wording are you looking at that makes you believe so?
To me, the phrase

# A socket object can be in one of three modes: blocking, non-blocking,
# or timeout

suggests otherwise.

----------

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


More information about the Python-bugs-list mailing list