--- a/mercurial/worker.py Mon Dec 17 15:05:52 2018 +0100
+++ b/mercurial/worker.py Tue Dec 18 10:21:25 2018 -0500
@@ -213,11 +213,7 @@
waitforworkers()
signal.signal(signal.SIGCHLD, oldchldhandler)
selector.close()
- status = problem[0]
- if status:
- if status < 0:
- os.kill(os.getpid(), -status)
- sys.exit(status)
+ return problem[0]
try:
openpipes = len(pipes)
while openpipes > 0:
@@ -236,7 +232,11 @@
killworkers()
cleanup()
raise
- cleanup()
+ status = cleanup()
+ if status:
+ if status < 0:
+ os.kill(os.getpid(), -status)
+ sys.exit(status)
def _posixexitstatus(code):
'''convert a posix exit status into the same form returned by