zsh-workers
 help / color / mirror / code / Atom feed
* Re: Getting information about dead processes
       [not found]   ` <20170704123913.15d5d06f__26986.931943293$1499168455$gmane$org@pwslap01u.europe.root.pri>
@ 2017-07-04 14:01     ` Leah Neukirchen
  0 siblings, 0 replies; only message in thread
From: Leah Neukirchen @ 2017-07-04 14:01 UTC (permalink / raw)
  To: zsh-workers

Peter Stephenson <p.stephenson@samsung.com> writes:

> 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.

Yes, but that is not distinguishable from a process just returning 141
or something else above 128.

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-07-04 14:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170704112709epcas4p4b1ccfc1885203983ec5d0a3288de4560@epcas4p4.samsung.com>
     [not found] ` <87bmp0tqjd.fsf@gmail.com>
     [not found]   ` <20170704123913.15d5d06f__26986.931943293$1499168455$gmane$org@pwslap01u.europe.root.pri>
2017-07-04 14:01     ` Getting information about dead processes Leah Neukirchen

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).