mercurial/util.py
changeset 667 31a9aa890016
parent 556 f6c6fa15ff70
child 698 df78d8ccac4c
child 705 574869103985
equal deleted inserted replaced
666:0100a43788ca 667:31a9aa890016
    23         return "exited with status %d" % val, val
    23         return "exited with status %d" % val, val
    24     elif os.WIFSIGNALED(code):
    24     elif os.WIFSIGNALED(code):
    25         val = os.WTERMSIG(code)
    25         val = os.WTERMSIG(code)
    26         return "killed by signal %d" % val, val
    26         return "killed by signal %d" % val, val
    27     elif os.WIFSTOPPED(code):
    27     elif os.WIFSTOPPED(code):
    28         val = os.STOPSIG(code)
    28         val = os.WSTOPSIG(code)
    29         return "stopped by signal %d" % val, val
    29         return "stopped by signal %d" % val, val
    30     raise ValueError("invalid exit code")
    30     raise ValueError("invalid exit code")
    31 
    31 
    32 def system(cmd, errprefix=None):
    32 def system(cmd, errprefix=None):
    33     """execute a shell command that must succeed"""
    33     """execute a shell command that must succeed"""