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.

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).

(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".)

----------
resolution: fixed -> 
Added file: http://bugs.python.org/file33045/epoll_except.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19876>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to