diff options
author | Philippe Altherr <philippe.altherr@gmail.com> | 2024-08-04 19:12:32 -0700 |
---|---|---|
committer | Bart Schaefer <schaefer@zsh.org> | 2024-08-04 19:12:32 -0700 |
commit | 4616ea398a5c1b04299dff9d25a8bc264c685540 (patch) | |
tree | ecc6beef758b59ee76aced4b953a64d7bfe73de6 /Src/exec.c | |
parent | 5cb32ec5ab1eafdad62500e7e6bdada2c3205a59 (diff) | |
download | zsh-4616ea398a5c1b04299dff9d25a8bc264c685540.tar.gz zsh-4616ea398a5c1b04299dff9d25a8bc264c685540.tar.xz zsh-4616ea398a5c1b04299dff9d25a8bc264c685540.zip |
53005: off-by-one error when resetting signals on subshell entrance
Diffstat (limited to 'Src/exec.c')
-rw-r--r-- | Src/exec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/exec.c b/Src/exec.c index 097e0b368..00278ac50 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -1089,7 +1089,7 @@ entersubsh(int flags, struct entersubsh_ret *retp) int i, sig, monitor, job_control_ok; if (!(flags & ESUB_KEEPTRAP)) - for (sig = 0; sig < SIGCOUNT; sig++) + for (sig = 0; sig <= SIGCOUNT; sig++) if (!(sigtrapped[sig] & ZSIG_FUNC) && !(isset(POSIXTRAPS) && (sigtrapped[sig] & ZSIG_IGNORED))) unsettrap(sig); @@ -1203,7 +1203,7 @@ entersubsh(int flags, struct entersubsh_ret *retp) * Start loop at 1 because 0 is SIGEXIT */ if (intrap) - for (sig = 1; sig < SIGCOUNT; sig++) + for (sig = 1; sig <= SIGCOUNT; sig++) if (sigtrapped[sig] && sigtrapped[sig] != ZSIG_IGNORED) signal_unblock(signal_mask(sig)); if (!job_control_ok) |