diff options
| author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2020-02-02 18:05:47 +0000 |
|---|---|---|
| committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2020-02-02 18:05:47 +0000 |
| commit | e01223a26cb7afd9f44805f067c4dcdad06039b0 (patch) | |
| tree | 55aa836496b6d616fad10e2bfa1015367799de84 /Src/loop.c | |
| parent | 45372: Record a symlink loop bug involving :P (diff) | |
| download | zsh-e01223a26cb7afd9f44805f067c4dcdad06039b0.tar zsh-e01223a26cb7afd9f44805f067c4dcdad06039b0.tar.gz zsh-e01223a26cb7afd9f44805f067c4dcdad06039b0.tar.bz2 zsh-e01223a26cb7afd9f44805f067c4dcdad06039b0.tar.lz zsh-e01223a26cb7afd9f44805f067c4dcdad06039b0.tar.xz zsh-e01223a26cb7afd9f44805f067c4dcdad06039b0.tar.zst zsh-e01223a26cb7afd9f44805f067c4dcdad06039b0.zip | |
45373: Fix ERR_EXIT bug in else branch of if.
The flags need resetting for this branch otherwise e.g. command
substitution with non-zero status doesn't cause exit.
Diffstat (limited to 'Src/loop.c')
| -rw-r--r-- | Src/loop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/loop.c b/Src/loop.c index 538afb8dc..01abc6cc9 100644 --- a/Src/loop.c +++ b/Src/loop.c @@ -570,7 +570,7 @@ execif(Estate state, int do_exec) if (run) { /* we need to ignore lastval until we reach execcmd() */ - if (olderrexit) + if (olderrexit || run == 2) noerrexit = olderrexit; else if (lastval) noerrexit |= NOERREXIT_EXIT | NOERREXIT_RETURN | NOERREXIT_UNTIL_EXEC; |
