diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-03-31 09:48:34 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-03-31 09:48:34 (GMT) |
commit | 4448c08451e947ccf197742d22fa49adba71e363 (patch) | |
tree | f1183e1f289ad178ec22e274644b86a6c3a0cf55 /Lib/selectors.py | |
parent | b6faf0dfa7e5d9f5b9f09bc1d1113069f1c962ab (diff) | |
download | cpython-4448c08451e947ccf197742d22fa49adba71e363.zip cpython-4448c08451e947ccf197742d22fa49adba71e363.tar.gz cpython-4448c08451e947ccf197742d22fa49adba71e363.tar.bz2 |
Issue #23485: select.kqueue.control() is now retried when interrupted by a signal
Diffstat (limited to 'Lib/selectors.py')
-rw-r--r-- | Lib/selectors.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/selectors.py b/Lib/selectors.py index 2a0a44c..a3f2e78 100644 --- a/Lib/selectors.py +++ b/Lib/selectors.py @@ -549,11 +549,9 @@ if hasattr(select, 'kqueue'): def select(self, timeout=None): timeout = None if timeout is None else max(timeout, 0) max_ev = len(self._fd_to_key) + kev_list = self._kqueue.control(None, max_ev, timeout) + ready = [] - try: - kev_list = self._kqueue.control(None, max_ev, timeout) - except InterruptedError: - return ready for kev in kev_list: fd = kev.ident flag = kev.filter |