diff --git a/mercurial/commandserver.py b/mercurial/commandserver.py index d1bda397df7330fb192a94dcb0801928a2492074_bWVyY3VyaWFsL2NvbW1hbmRzZXJ2ZXIucHk=..41f0529b511272f2675cd4d9c3479460f022f6b9_bWVyY3VyaWFsL2NvbW1hbmRzZXJ2ZXIucHk= 100644 --- a/mercurial/commandserver.py +++ b/mercurial/commandserver.py @@ -472,7 +472,15 @@ # waiting for recv() will receive ECONNRESET. self._unlinksocket() exiting = True - ready = selector.select(timeout=h.pollinterval) + try: + ready = selector.select(timeout=h.pollinterval) + except OSError as inst: + # selectors2 raises ETIMEDOUT if timeout exceeded while + # handling signal interrupt. That's probably wrong, but + # we can easily get around it. + if inst.errno != errno.ETIMEDOUT: + raise + ready = [] if not ready: # only exit if we completed all queued requests if exiting: