diff -r 9ac96b9fa76e -r 8f07f5a9c3de mercurial/worker.py --- a/mercurial/worker.py Tue Nov 03 09:56:02 2020 -0800 +++ b/mercurial/worker.py Sat Nov 07 21:50:28 2020 -0800 @@ -300,7 +300,7 @@ if status: if status < 0: os.kill(os.getpid(), -status) - sys.exit(status) + raise error.WorkerError(status) if hasretval: yield True, retval