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

Antoine Pitrou report at bugs.python.org
Wed Mar 30 17:40:54 CEST 2011


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

> I also don't think there is a portable way to detect the NBIO attribute 
> of a socket, so we still have a case of socket.gettimeout() not 
> accurately reflecting the blocking state of the socket

Which case?

> I personally think that this logic should go into socketmodule.c where 
> the rest of the timeout logic sits, rather than be exctracted like this 
> out into the python world.

I think practicality beats purity. If putting it in socket.py ends up producing bugs, we'll have to consider moving it to the C extension. Until then, the Python code has the advantage of being clear and concise.

----------

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


More information about the Python-bugs-list mailing list