diff options
author | Barton E. Schaefer <schaefer@zsh.org> | 2017-09-27 20:34:11 -0700 |
---|---|---|
committer | Barton E. Schaefer <schaefer@zsh.org> | 2017-09-27 20:34:11 -0700 |
commit | 7a0718796a56be64b5498806b4d8491ef2f9bb7d (patch) | |
tree | 5ca040b832bb08ba2aeeb19cfc23e76cdba34567 /Src | |
parent | 6230e82d44da25773437c5438c83a5d5fe275420 (diff) | |
download | zsh-7a0718796a56be64b5498806b4d8491ef2f9bb7d.tar.gz zsh-7a0718796a56be64b5498806b4d8491ef2f9bb7d.tar.xz zsh-7a0718796a56be64b5498806b4d8491ef2f9bb7d.zip |
41767: preserve nonzero exit status on interrupt
Diffstat (limited to 'Src')
-rw-r--r-- | Src/exec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/exec.c b/Src/exec.c index 161d4ac5e..0d2dc4ebb 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; |