Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: exit status 0 after SIGINT
- X-seq: zsh-workers 41768
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: exit status 0 after SIGINT
- Date: Tue, 26 Sep 2017 19:15:26 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ntlworld.com; s=meg.feb2017; t=1506449728; bh=aHDV22tdAbnQpyu/m2za9FSKGP1l4JvhCOvFiXakIGc=; h=Date:From:To:Subject:In-Reply-To:References; b=Sdv/YacJ5UIiQWCvPEP8FoB56a0fMFPilmoadQtMjAI+7CqR7JPdMBbm1cvzLqgLS TDBtP9w1EDZz2ol7rc47XyarG2FpH1HcDlDCdUUwj0ibWUa3sIcvHUXbKOqWpEEltj sdNNL4xSTLUYrV7amQ8ke0SBVTlwSaASxb2tmNRzHR1c6tCI0cYNrHexZC3TKE+wCd coyhD/b7QWGWcLfKjQPuxgIxFaz8w3lAARMcvut+04y31AT54RWRE0mLRro1XYaPLI ouHoecwbInYUke/4kzzBLgWWwDE/QSP+lIcPcf1r06+YZYRSufeJCQZl2h5TMxdcDB sDZNiJGp78PjA==
- In-reply-to: <757d2c4c-fb9f-d168-c70a-08560677a181@inlv.org>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CGME20170925125104epcas5p3948e0702e32903ad3a09070937edbb54@epcas5p3.samsung.com> <2f98bd49-1439-2bd9-c7b2-7d05ac8678fc@inlv.org> <20170925145717.13849173@pwslap01u.europe.root.pri> <757d2c4c-fb9f-d168-c70a-08560677a181@inlv.org>
On Tue, 26 Sep 2017 11:57:33 +0100
Martijn Dekker <martijn@xxxxxxxx> wrote:
> % kill -s INT $$ || echo oops
> % echo $?
> 1
> % kill -s INT $$ && echo oops
> % echo $?
> 130
>
> Both should be 130.
It's probably something like this. Hard to know under exactly what
circumstance to change the value but leaving it alone if it's already
non-zero doesn't seem too idiotic.
Soureforge is down at the moment.
pws
diff --git a/Src/exec.c b/Src/exec.c
index bd242d1..75a9f2b 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -3199,7 +3199,8 @@ execcmd_exec(Estate state, Execcmd_params eparams,
}
if (errflag) {
- lastval = 1;
+ if (!lastval)
+ lastval = 1;
if (oautocont >= 0)
opts[AUTOCONTINUE] = oautocont;
return;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author