Richard Oudkerk added the comment:

I remember wondering at one time why EPOLLNVAL did not exist, and realizing 
that closed fds are just silently unregistered by epoll().

I guess the issue is that some of the selectors indicate a bad fd on 
registration, and others do it when polled.

                On registration      On poll
----------------------------------------------------------------
SelectSelector  No                   Raises OSError
PollSelector    No                   No (EVENT_READ or EVENT_WRITE)
EpollSelector   Raises OSError       No
KqueueSelector  ?                    ?

It would be easiest to relax the test, perhaps by just checking that 
conn.poll(0) raises or returns True.

Or maybe PollSelector.select() should raise OSError if POLLNVAL is indicated.  
That would match the behaviour of SelectSelector.select().

----------

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

Reply via email to