Mercurial > cpython-lru_cache-weakref
diff Modules/selectmodule.c @ 85430:b4bc10514174
select.epoll.fromfd(fd) must be not change the inheritable flag of the file
descriptor
| author | Victor Stinner <vstinner@wyplay.com> |
|---|---|
| date | Wed, 28 Aug 2013 12:22:39 +0200 |
| parents | ef889c3d5dc6 |
| children | b49f9aa12dae |
line wrap: on
line diff
--- a/Modules/selectmodule.c Wed Aug 28 12:21:47 2013 +0200 +++ b/Modules/selectmodule.c Wed Aug 28 12:22:39 2013 +0200 @@ -1212,7 +1212,7 @@ } #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; }
