diff options
author | Victor Stinner <vstinner@wyplay.com> | 2013-08-28 10:22:39 (GMT) |
---|---|---|
committer | Victor Stinner <vstinner@wyplay.com> | 2013-08-28 10:22:39 (GMT) |
commit | d72fe89b800cf8ce66b742c16e93345361976ee6 (patch) | |
tree | f1bf6d31ce646865232014dd097099544c000fc0 | |
parent | 67973c02790471b23a66b798533ea7ceb8d1dc9d (diff) | |
download | cpython-d72fe89b800cf8ce66b742c16e93345361976ee6.zip cpython-d72fe89b800cf8ce66b742c16e93345361976ee6.tar.gz cpython-d72fe89b800cf8ce66b742c16e93345361976ee6.tar.bz2 |
select.epoll.fromfd(fd) must be not change the inheritable flag of the file
descriptor
-rw-r--r-- | Modules/selectmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c index 0ff09b4..22106b1 100644 --- a/Modules/selectmodule.c +++ b/Modules/selectmodule.c @@ -1212,7 +1212,7 @@ newPyEpoll_Object(PyTypeObject *type, int sizehint, int flags, SOCKET fd) } #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); return NULL; } |