summaryrefslogtreecommitdiff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2016-12-06 21:51:35 +0100
committerAxel Beckert <abe@deuxchevaux.org>2016-12-06 21:51:35 +0100
commite631e433ac7afacf9f756f2bc0dec47fa5930a24 (patch)
tree9d67e40f2c33ad956c063f1356dbd226cf649850 /Src/exec.c
parentf6ab748f518e7fa542f3a7bef311c698a45b1fef (diff)
parent9f605904dda106c181717877f29261782fbf243d (diff)
downloadzsh-e631e433ac7afacf9f756f2bc0dec47fa5930a24.tar.gz
zsh-e631e433ac7afacf9f756f2bc0dec47fa5930a24.zip
Merge tag 'zsh-5.2-test-2' into debian
Second test version before 5.3
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/Src/exec.c b/Src/exec.c
index f544a33e7..a439aec7f 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -46,6 +46,11 @@ enum {
/**/
int noerrexit;
+/* used to suppress ERREXIT for one occurrence */
+
+/**/
+int this_noerrexit;
+
/*
* noerrs = 1: suppress error messages
* noerrs = 2: don't set errflag on parse error, either
@@ -424,6 +429,7 @@ execcursh(Estate state, int do_exec)
cmdpop();
state->pc = end;
+ this_noerrexit = 1;
return lastval;
}
@@ -1238,7 +1244,8 @@ execlist(Estate state, int dont_change_job, int exiting)
}
while (wc_code(code) == WC_LIST && !breaks && !retflag && !errflag) {
int donedebug;
- int this_noerrexit = 0, this_donetrap = 0;
+ int this_donetrap = 0;
+ this_noerrexit = 0;
ltype = WC_LIST_TYPE(code);
csp = cmdsp;
@@ -5813,6 +5820,7 @@ execsave(void)
es->trapisfunc = trapisfunc;
es->traplocallevel = traplocallevel;
es->noerrs = noerrs;
+ es->this_noerrexit = this_noerrexit;
es->underscore = ztrdup(zunderscore);
es->next = exstack;
exstack = es;
@@ -5847,6 +5855,7 @@ execrestore(void)
trapisfunc = en->trapisfunc;
traplocallevel = en->traplocallevel;
noerrs = en->noerrs;
+ this_noerrexit = en->this_noerrexit;
setunderscore(en->underscore);
zsfree(en->underscore);
free(en);