Commit d72fe89b authored by Victor Stinner's avatar Victor Stinner

select.epoll.fromfd(fd) must be not change the inheritable flag of the file

descriptor
parent 67973c02
...@@ -1212,7 +1212,7 @@ newPyEpoll_Object(PyTypeObject *type, int sizehint, int flags, SOCKET fd) ...@@ -1212,7 +1212,7 @@ newPyEpoll_Object(PyTypeObject *type, int sizehint, int flags, SOCKET fd)
} }
#ifndef HAVE_EPOLL_CREATE1 #ifndef HAVE_EPOLL_CREATE1
if (_Py_set_inheritable(self->epfd, 0, NULL) < 0) { if (fd == -1 && _Py_set_inheritable(self->epfd, 0, NULL) < 0) {
Py_DECREF(self); Py_DECREF(self);
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment