summaryrefslogtreecommitdiffstats
path: root/Src/exec.c
diff options
context:
space:
mode:
authorPhilippe Altherr <philippe.altherr@gmail.com>2026-05-09 13:36:54 -0700
committerBart Schaefer <schaefer@zsh.org>2026-05-09 13:36:54 -0700
commit64f8448103463999c5b75d7c01f39f31e2dd31fd (patch)
treef0a5460d8964da3d2378c5ee7298acad05c4ac2b /Src/exec.c
parent54484: tests: fix -nt test on low-resolution file systems (diff)
downloadzsh-64f8448103463999c5b75d7c01f39f31e2dd31fd.tar
zsh-64f8448103463999c5b75d7c01f39f31e2dd31fd.tar.gz
zsh-64f8448103463999c5b75d7c01f39f31e2dd31fd.tar.bz2
zsh-64f8448103463999c5b75d7c01f39f31e2dd31fd.tar.lz
zsh-64f8448103463999c5b75d7c01f39f31e2dd31fd.tar.xz
zsh-64f8448103463999c5b75d7c01f39f31e2dd31fd.tar.zst
zsh-64f8448103463999c5b75d7c01f39f31e2dd31fd.zip
54374: Run ZERR trap on zsh errors
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 47d70b5a9..60075f254 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -1598,7 +1598,10 @@ sublist_done:
if (!this_noerrexit && !donetrap && !this_donetrap) {
if (sigtrapped[SIGZERR] && lastval &&
!(noerrexit & NOERREXIT_EXIT)) {
+ int eflag = errflag;
+ errflag = 0;
dotrap(SIGZERR);
+ errflag = eflag;
donetrap = 1;
}
if (lastval) {