Mercurial > public > mercurial-scm > hg-stable
diff mercurial/worker.py @ 31134:13bbcd56c57a
merge with stable
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 28 Feb 2017 11:13:25 -0800 |
parents | 48dea083f66d a91c62752d08 |
children | 9d3d56aa1a9f |
line wrap: on
line diff
--- a/mercurial/worker.py Sun Nov 06 20:16:54 2016 +0100 +++ b/mercurial/worker.py Tue Feb 28 11:13:25 2017 -0800 @@ -120,9 +120,12 @@ break else: raise - if p: - pids.discard(p) - st = _exitstatus(st) + if not p: + # skip subsequent steps, because child process should + # be still running in this case + continue + pids.discard(p) + st = _exitstatus(st) if st and not problem[0]: problem[0] = st def sigchldhandler(signum, frame): @@ -145,12 +148,16 @@ # may do some clean-ups which could cause surprises like deadlock. # see sshpeer.cleanup for example. try: - scmutil.callcatch(ui, workerfunc) + try: + scmutil.callcatch(ui, workerfunc) + finally: + ui.flush() except KeyboardInterrupt: os._exit(255) except: # never return, therefore no re-raises try: ui.traceback() + ui.flush() finally: os._exit(255) else: