STINNER Victor added the comment:

My implementation of the PEP 433 uses accept4() for socket.accept() if the 
(new) cloexec parameter is True:
http://hg.python.org/features/pep-433/file/46b7a077ae87/Modules/socketmodule.c#l1961

The code fallbacks to accept() if accept4() fails with ENOSYS. It happens if 
the glibc version is 2.10 or newer, whereas the Linux kernel is older than 
2.6.28. I didn't test the fallback yet.

I see in changeset 12442ac3f7dd (issue #7523) that SOCK_NONBLOCK is also set in 
the flags parameters of accept4(). I should probably also do that.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10115>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to