diff options
author | Chet Ramey <chet.ramey@case.edu> | 2018-12-20 11:41:58 -0500 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2018-12-20 11:41:58 -0500 |
commit | f250956cb2a8dca13fc0242affc225f9d6983604 (patch) | |
tree | 2df8e15963af786dc8efed1c91c4d823a3bf05bb /execute_cmd.c | |
parent | 2ae59c1134a75d5778997b7202b15b0586283042 (diff) | |
download | bash-5.0-testing.tar.gz |
bash-5.0-rc1 releasebash-5.0-rc1bash-5.0-testing
Diffstat (limited to 'execute_cmd.c')
-rw-r--r-- | execute_cmd.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/execute_cmd.c b/execute_cmd.c index 87f5eb77..8b3c83aa 100644 --- a/execute_cmd.c +++ b/execute_cmd.c @@ -1553,6 +1553,15 @@ execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close) trap strings if we run trap to change a signal disposition. */ reset_signal_handlers (); subshell_environment |= SUBSHELL_RESETTRAP; +#if 0 /* TAG:bash-5.1 */ + /* We are in a subshell, so forget that we are running a trap handler or + that the signal handler has changed (we haven't changed it!) */ + if (running_trap > 0) + { + run_trap_cleanup (running_trap - 1); + running_trap = 0; + } +#endif /* Make sure restore_original_signals doesn't undo the work done by make_child to ensure that asynchronous children are immune to SIGINT @@ -1607,7 +1616,7 @@ execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close) async_redirect_stdin (); #if 0 - /* XXX - TAG: bash-5.1 */ + /* XXX - TAG:bash-5.1 */ if (user_subshell && command->type == cm_subshell) optimize_subshell_command (command->value.Subshell->command); #endif @@ -2976,7 +2985,7 @@ eval_arith_for_expr (l, okp) command_string_index = 0; print_arith_command (new); - if (signal_in_progress (DEBUG_TRAP) == 0) + if (signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0) { FREE (the_printed_command_except_trap); the_printed_command_except_trap = savestring (the_printed_command); @@ -3708,7 +3717,7 @@ execute_arith_command (arith_command) command_string_index = 0; print_arith_command (arith_command->exp); - if (signal_in_progress (DEBUG_TRAP) == 0) + if (signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0) { FREE (the_printed_command_except_trap); the_printed_command_except_trap = savestring (the_printed_command); @@ -3909,7 +3918,7 @@ execute_cond_command (cond_command) command_string_index = 0; print_cond_command (cond_command); - if (signal_in_progress (DEBUG_TRAP) == 0) + if (signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0) { FREE (the_printed_command_except_trap); the_printed_command_except_trap = savestring (the_printed_command); |