mirror of
https://github.com/zsh-users/zsh
synced 2024-11-05 16:08:45 +00:00
36707: distinguish ERR_RETURN value of retflag so that execif() can ignore it in the test sublist
This commit is contained in:
parent
d1a810b000
commit
2bf4f667fb
3 changed files with 10 additions and 3 deletions
|
@ -10,6 +10,9 @@
|
|||
|
||||
2015-09-30 Barton E. Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 36707: Src/exec.c, Src/loop.c: distinguish ERR_RETURN value
|
||||
of retflag so that execif() can ignore it in the test sublist
|
||||
|
||||
* cf. 36690: Doc/Zsh/builtins.yo: remove sentence fragment
|
||||
|
||||
2015-09-30 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||
|
|
|
@ -1408,7 +1408,7 @@ sublist_done:
|
|||
exit(lastval);
|
||||
}
|
||||
if (errreturn) {
|
||||
retflag = 1;
|
||||
retflag = 2;
|
||||
breaks = loops;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -552,8 +552,12 @@ execif(Estate state, int do_exec)
|
|||
run = 1;
|
||||
break;
|
||||
}
|
||||
if (retflag)
|
||||
break;
|
||||
if (retflag) {
|
||||
if (retflag == 2)
|
||||
retflag = 0; /* Never ERR_RETURN here */
|
||||
else
|
||||
break;
|
||||
}
|
||||
s = 1;
|
||||
state->pc = next;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue