fixes for SIGINT handling in asynchronous lists

This commit is contained in:
Chet Ramey
2023-01-17 13:31:46 -05:00
parent 0647e53bd1
commit a5d2617c7a
11 changed files with 767 additions and 1248 deletions
+7 -1
View File
@@ -210,7 +210,13 @@ trap_builtin (WORD_LIST *list)
{
case SIGINT:
/* XXX - should we do this if original disposition
was SIG_IGN? */
was SIG_IGN? Yes, because setup_async_signals can
set the original disposition to SIG_IGN to keep
restore_signal from restoring the SIGINT
disposition from when the shell was invoked, and
we want to allow an asynchronous subshell to
use `trap' to restore the default disposition or
set a trap command. */
if (interactive)
set_signal_handler (SIGINT, sigint_sighandler);
/* special cases for interactive == 0 */