From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22733 invoked by alias); 4 Jul 2017 14:02:07 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 41395 Received: (qmail 3377 invoked from network); 4 Jul 2017 14:02:07 -0000 X-Qmail-Scanner-Diagnostics: from 195.159.176.226 by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(195.159.176.226):SA:0(1.3/5.0):. Processed in 2.22196 secs); 04 Jul 2017 14:02:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: gcszd-zsh-workers@m.gmane.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at m.gmane.org does not designate permitted sender hosts) X-Injected-Via-Gmane: http://gmane.org/ To: zsh-workers@zsh.org From: Leah Neukirchen Subject: Re: Getting information about dead processes Date: Tue, 04 Jul 2017 16:01:38 +0200 Message-ID: <87r2xws3lp.fsf@gmail.com> References: <87bmp0tqjd.fsf@gmail.com> <20170704123913.15d5d06f__26986.931943293$1499168455$gmane$org@pwslap01u.europe.root.pri> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@blaine.gmane.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) In-Reply-To: <20170704123913.15d5d06f__26986.931943293$1499168455$gmane$org@pwslap01u.europe.root.pri> (Peter Stephenson's message of "Tue, 04 Jul 2017 12:39:13 +0100") Peter Stephenson writes: > On Tue, 4 Jul 2017 13:00:54 +0200 > Leah Neukirchen 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 http://leah.zone