unwind_protect_int (jobs_list_frozen);
unwind_protect_pointer (the_pipeline);
unwind_protect_pointer (subst_assign_varlist);
+ unwind_protect_pointer (this_shell_builtin);
/* 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 ()
void
end_job_control ()
{
- if (interactive_shell) /* XXX - should it be interactive? */
+ if (interactive_shell || job_control) /* XXX - should it be just job_control? */
{
terminate_stopped_jobs ();