Expand description
Exit-status mapping shared by every path that runs a child command (#1881).
ExitStatus::code() is None when the child was terminated by a signal.
Mapping that to 1 made a SIGTERM’d or SIGKILL’d command look like an
ordinary failure — or, for grep-style commands with output, like success.
Shells report such a child as 128 + signal, and so do we.
Functions§
- exit_
code - The shell-convention exit code of a finished child: its exit code, or
128 + signalwhen a signal terminated it (130 SIGINT, 137 SIGKILL, 143 SIGTERM, …). - exit_
footer exit_markeras a footer: empty on success, otherwise the marker on its own line.- exit_
marker - The
[exit:N]marker appended to a failed command’s output, without a leading newline.Noneon success. Timeouts (124, #815) and signal terminations are spelled out so an agent does not mistake them for an ordinary failure.