summaryrefslogtreecommitdiff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/exec.c4
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)