mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-05-21 12:01:54 +02:00
51094: consistent use of bit-manipulation for noerrexit value changes
This commit is contained in:
parent
ab9c579ef9
commit
8086f10615
3 changed files with 7 additions and 4 deletions
|
@ -1,5 +1,8 @@
|
|||
2022-12-03 Bart Schaefer <schaefer@zsh.org>
|
||||
|
||||
* Philippe Altherr: 51094: Src/exec.c, Src/loop.c: consistent
|
||||
use of bit-manipulation for noerrexit flag value changes
|
||||
|
||||
* Philippe Altherr: 51098: Src/exec.c, Src/loop.c, Src/zsh.h:
|
||||
remove unreachable NOERREXIT_UNTIL_EXEC code and effects
|
||||
|
||||
|
|
|
@ -1415,7 +1415,7 @@ execlist(Estate state, int dont_change_job, int exiting)
|
|||
int oerrexit_opt = opts[ERREXIT];
|
||||
Param pm;
|
||||
opts[ERREXIT] = 0;
|
||||
noerrexit = NOERREXIT_EXIT | NOERREXIT_RETURN;
|
||||
noerrexit |= NOERREXIT_EXIT | NOERREXIT_RETURN;
|
||||
if (ltype & Z_SIMPLE) /* skip the line number */
|
||||
pc2++;
|
||||
pm = assignsparam("ZSH_DEBUG_CMD",
|
||||
|
@ -1472,7 +1472,7 @@ execlist(Estate state, int dont_change_job, int exiting)
|
|||
next = state->pc + WC_SUBLIST_SKIP(code);
|
||||
/* suppress errexit for commands before && and || and after ! */
|
||||
if (isandor || isnot)
|
||||
noerrexit = NOERREXIT_EXIT | NOERREXIT_RETURN;
|
||||
noerrexit |= NOERREXIT_EXIT | NOERREXIT_RETURN;
|
||||
switch (WC_SUBLIST_TYPE(code)) {
|
||||
case WC_SUBLIST_END:
|
||||
/* End of sublist; just execute, ignoring status. */
|
||||
|
@ -1568,7 +1568,7 @@ sublist_done:
|
|||
*/
|
||||
int oerrexit_opt = opts[ERREXIT];
|
||||
opts[ERREXIT] = 0;
|
||||
noerrexit = NOERREXIT_EXIT | NOERREXIT_RETURN;
|
||||
noerrexit |= NOERREXIT_EXIT | NOERREXIT_RETURN;
|
||||
exiting = donetrap;
|
||||
ret = lastval;
|
||||
dotrap(SIGDEBUG);
|
||||
|
|
|
@ -428,7 +428,7 @@ execwhile(Estate state, UNUSED(int do_exec))
|
|||
} else {
|
||||
for (;;) {
|
||||
state->pc = loop;
|
||||
noerrexit = NOERREXIT_EXIT | NOERREXIT_RETURN;
|
||||
noerrexit |= NOERREXIT_EXIT | NOERREXIT_RETURN;
|
||||
|
||||
/* In case the test condition is a functional no-op,
|
||||
* make sure signal handlers recognize ^C to end the loop. */
|
||||
|
|
Loading…
Reference in a new issue