summaryrefslogtreecommitdiffstats
path: root/Lib/selectors.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-03-31 09:48:34 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-03-31 09:48:34 (GMT)
commit4448c08451e947ccf197742d22fa49adba71e363 (patch)
treef1183e1f289ad178ec22e274644b86a6c3a0cf55 /Lib/selectors.py
parentb6faf0dfa7e5d9f5b9f09bc1d1113069f1c962ab (diff)
downloadcpython-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.py6
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