[docs] [issue19876] selectors (and asyncio?): document behaviour on closed files/sockets

STINNER Victor report at bugs.python.org
Sun Dec 8 12:22:14 CET 2013


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 <report at bugs.python.org>
<http://bugs.python.org/issue19876>
_______________________________________


More information about the docs mailing list