This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients docs@python, gvanrossum, neologix, python-dev, vstinner
Date 2013-12-08.12:11:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
> STINNER Victor added the comment:
> I don't like generic "except OSError: pass". Here is a first patch for epoll() to use "except FileNotFoundError: pass" instead. Kqueue selector should also be patched.

Except that it can fail with ENOENT, but also EBADF, and EPERM if the
FD has been reused by a FD which doesn't support epoll.
So if we want to go this way, we should at least catach ENOENT, EBADF
and EPERM. Same for kqueue: we should at least catch ENOENT and EBADF.

> I tested to close epoll FD (os.close(epoll.fileno())): on Linux 3.11, epoll.unregister(fd) and epoll.close() don't raise an error. Strange. (The C code looks correct).

unregister() ignores EBADF.

> (About the commit: I don't like "_fileobj_lookup" method name, we loose the information (compared to "_fileobj_to_fd" name) that the method returns a file dscriptor. I would prefer "_get_fd" or "_get_fileobj_fd".)

Well, Guido likes it, I like it, and this is really nit-picking
(especially since it's a private method).
Date User Action Args
2013-12-08 12:12:00neologixsetrecipients: + neologix, gvanrossum, vstinner, docs@python, python-dev
2013-12-08 12:12:00neologixlinkissue19876 messages
2013-12-08 12:11:59neologixcreate