diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-03-30 19:38:00 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-03-30 19:38:00 (GMT) |
commit | 3c7d6e069331ceab0da6b794e4069f07bb3d4aac (patch) | |
tree | 42284993b3b0cdc127c69218140a2650e73b8e60 /Lib/selectors.py | |
parent | fa09beb1508f782b51ba0a2815c07e0294f40e95 (diff) | |
download | cpython-3c7d6e069331ceab0da6b794e4069f07bb3d4aac.zip cpython-3c7d6e069331ceab0da6b794e4069f07bb3d4aac.tar.gz cpython-3c7d6e069331ceab0da6b794e4069f07bb3d4aac.tar.bz2 |
Issue #23485: select.poll.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 4f2a377..bf48ebf 100644 --- a/Lib/selectors.py +++ b/Lib/selectors.py @@ -359,11 +359,10 @@ if hasattr(select, 'poll'): # poll() 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._poll.poll(timeout) + ready = [] - try: - fd_event_list = self._poll.poll(timeout) - except InterruptedError: - return ready for fd, event in fd_event_list: events = 0 if event & ~select.POLLIN: |