diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-03-31 10:10:33 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-03-31 10:10:33 (GMT) |
commit | 45ca48b03d08cdc9959e0577bc84b845931112f6 (patch) | |
tree | eb66f50e3fb83a117fdb522531b8123b3353a4e7 /Lib/selectors.py | |
parent | 4448c08451e947ccf197742d22fa49adba71e363 (diff) | |
download | cpython-45ca48b03d08cdc9959e0577bc84b845931112f6.zip cpython-45ca48b03d08cdc9959e0577bc84b845931112f6.tar.gz cpython-45ca48b03d08cdc9959e0577bc84b845931112f6.tar.bz2 |
Issue #23485: select.devpoll.poll() is now retried when interrupted by a signal
Diffstat (limited to 'Lib/selectors.py')
-rw-r--r-- | Lib/selectors.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/selectors.py b/Lib/selectors.py index a3f2e78..44a6150 100644 --- a/Lib/selectors.py +++ b/Lib/selectors.py @@ -479,11 +479,10 @@ if hasattr(select, 'devpoll'): # devpoll() has a resolution of 1 millisecond, round away from # zero to wait *at least* timeout seconds. timeout = math.ceil(timeout * 1e3) + + fd_event_list = self._devpoll.poll(timeout) + ready = [] - try: - fd_event_list = self._devpoll.poll(timeout) - except InterruptedError: - return ready for fd, event in fd_event_list: events = 0 if event & ~select.POLLIN: |