ProcessExit should have method .code() -> int
#17618
Labels
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
.code() -> int
#17618
When a process exits due to a signal, and that process was launched by a shell, the shell typically treats the exit status of the process to be 128 + the signal number. This is true for bash, fish, and zsh (I haven't tested other shells). Based on this, it would be convenient for
ProcessExit
to have a methodthat replicates this behavior, in order to make it easier for programs that don't want to have to care about the distinction between a signal and a normal exit.
The text was updated successfully, but these errors were encountered: