zsh-users
 help / color / mirror / code / Atom feed
* Getting information about dead processes
@ 2017-07-04 11:00 ` Leah Neukirchen
  2017-07-04 11:39   ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Leah Neukirchen @ 2017-07-04 11:00 UTC (permalink / raw)
  To: zsh-users

Hi,

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?

Thanks,
-- 
Leah Neukirchen  <leah@vuxu.org>  http://leah.zone


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Getting information about dead processes
  2017-07-04 11:00 ` Getting information about dead processes Leah Neukirchen
@ 2017-07-04 11:39   ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2017-07-04 11:39 UTC (permalink / raw)
  To: zsh-users

On Tue, 4 Jul 2017 13:00:54 +0200
Leah Neukirchen <leah@vuxu.org> 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-04 11:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170704112709epcas4p4b1ccfc1885203983ec5d0a3288de4560@epcas4p4.samsung.com>
2017-07-04 11:00 ` Getting information about dead processes Leah Neukirchen
2017-07-04 11:39   ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).