summaryrefslogtreecommitdiff
path: root/jobs.c
diff options
context:
space:
mode:
Diffstat (limited to 'jobs.c')
-rw-r--r--jobs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/jobs.c b/jobs.c
index 55d6ba19..1d8405d8 100644
--- a/jobs.c
+++ b/jobs.c
@@ -3845,6 +3845,7 @@ run_sigchld_trap (nchild)
unwind_protect_pointer (the_pipeline);
unwind_protect_pointer (subst_assign_varlist);
unwind_protect_pointer (this_shell_builtin);
+ unwind_protect_pointer (temporary_env);
/* We have to add the commands this way because they will be run
in reverse order of adding. We don't want maybe_set_sigchld_trap ()
@@ -3854,6 +3855,7 @@ run_sigchld_trap (nchild)
subst_assign_varlist = (WORD_LIST *)NULL;
the_pipeline = (PROCESS *)NULL;
+ temporary_env = 0; /* traps should not run with temporary env */
running_trap = SIGCHLD + 1;