--- a/mercurial/commandserver.py Thu Nov 29 09:13:13 2018 +0000
+++ b/mercurial/commandserver.py Tue Dec 04 17:13:01 2018 -0500
@@ -526,7 +526,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: