summaryrefslogtreecommitdiff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2012-12-13 10:36:59 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2012-12-13 10:36:59 +0000
commit1869eeb393e2499e9949cc3458cdd74685342540 (patch)
treef896416f82e80f5b57787dda4195354531aebcf5 /Src/exec.c
parent431c22024d8af440ca4b79ce951896f3bcd0d7cc (diff)
downloadzsh-1869eeb393e2499e9949cc3458cdd74685342540.tar.gz
zsh-1869eeb393e2499e9949cc3458cdd74685342540.zip
30876: fix obscure failures to propagate non-zero status
from optimised simple commands within lists
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 74b14d54d..1ecbc3967 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -1207,6 +1207,9 @@ execlist(Estate state, int dont_change_job, int exiting)
} else
donedebug = intrap ? 1 : 0;
+ /* Reset donetrap: this ensures that a trap is only *
+ * called once for each sublist that fails. */
+ donetrap = 0;
if (ltype & Z_SIMPLE) {
next = state->pc + WC_LIST_SKIP(code);
if (donedebug != 2)
@@ -1214,9 +1217,6 @@ execlist(Estate state, int dont_change_job, int exiting)
state->pc = next;
goto sublist_done;
}
- /* Reset donetrap: this ensures that a trap is only *
- * called once for each sublist that fails. */
- donetrap = 0;
/* Loop through code followed by &&, ||, or end of sublist. */
code = *state->pc++;