Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Getting information about dead processes



On Tue, 4 Jul 2017 13:00:54 +0200
Leah Neukirchen <leah@xxxxxxxx> wrote:
> in $? or $status we can find the exit code of the last process, but I
> can't see a way to find more detail about the exit status.  The job
> layer has access to WIFSIGNALED and WTERMSIG, and displays if a
> process died due to a signal.  How can I access this data from a zsh
> script/interactive session?

If the process died due to a signal, then 128 is added to the signal
value.  So 130 indicates a process died to to signal 2, almost certainly
SIGINT.  The status value itself would be irrelevant, as the process
didn't get the chance to return one.

pws



Messages sorted by: Reverse Date, Date, Thread, Author