[issue7523] add SOCK_NONBLOCK and SOCK_CLOEXEC to socket module
Antoine Pitrou
report at bugs.python.org
Wed Oct 13 23:04:15 CEST 2010
Antoine Pitrou <pitrou at free.fr> added the comment:
> For some reason does another trip through BEGIN_SELECT_LOOP() macro
Indeed:
if (!timeout)
+#ifdef HAVE_ACCEPT4
+ /* inherit socket flags and use accept4 call */
+ flags = s->sock_type & (SOCK_CLOEXEC | SOCK_NONBLOCK);
+ newfd = accept4(s->sock_fd, SAS2SA(&addrbuf), &addrlen, flags);
+#else
There's a missing curly brace after "if (!timeout)", so accept4() is always called.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7523>
_______________________________________
More information about the Python-bugs-list
mailing list