if (user_subshell)
{
- subshell_environment = SUBSHELL_PAREN; /* XXX */
+ subshell_environment = SUBSHELL_PAREN|SUBSHELL_IGNTRAP; /* XXX */
if (asynchronous)
subshell_environment |= SUBSHELL_ASYNC;
}
else
{
- subshell_environment = 0; /* XXX */
+ subshell_environment = SUBSHELL_IGNTRAP; /* XXX */
if (asynchronous)
subshell_environment |= SUBSHELL_ASYNC;
if (pipe_in != NO_PIPE || pipe_out != NO_PIPE)
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
-#define PATCHLEVEL 11
+#define PATCHLEVEL 12
#endif /* _PATCHLEVEL_H_ */
interrupt_execution = retain_fifos = executing_funsub = 0;
comsub_ignore_return = return_catch_flag = wait_intr_flag = 0;
- run_exit_trap (); /* XXX - run exit trap possibly in signal context? */
+ /* Don't run the exit trap if we're supposed to be ignoring traps in a
+ subshell environment. */
+ if ((subshell_environment & SUBSHELL_IGNTRAP) == 0)
+ run_exit_trap (); /* XXX - run exit trap possibly in signal context? */
kill_shell (sig);
}