procutil: do not convert return code of signal exit to positive number (API)
The docstring states that "codes from kill are negative", and it doesn't
make sense to make exit/signal code ambiguous.
.. api::
``hook.hook()`` and ``hook.runhooks()`` may return a negative integer
to denote that the process was killed by signal.
--- a/mercurial/utils/procutil.py Sat Apr 07 21:17:50 2018 +0900
+++ b/mercurial/utils/procutil.py Sat Apr 07 21:21:03 2018 +0900
@@ -83,7 +83,7 @@
(codes from kill are negative - not os.system/wait encoding)"""
if code >= 0:
return _("exited with status %d") % code, code
- return _("killed by signal %d") % -code, -code
+ return _("killed by signal %d") % -code, code
class _pfile(object):
"""File-like wrapper for a stream opened by subprocess.Popen()"""