mercurial/commandserver.py
changeset 40819 cb372d09d30a
parent 40594 234c2d8c9e48
parent 40788 41f0529b5112
child 40823 368ecbf734af
--- 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: