diff options
author | Chet Ramey <chet.ramey@case.edu> | 2011-12-12 21:56:29 -0500 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2011-12-12 21:56:29 -0500 |
commit | 9e51a74d57554525639a5ce59f7011386223c5c0 (patch) | |
tree | 2b1cb7afbcfb284fdbb2f4730e919a9dc91d3f83 /sig.c~ | |
parent | 1b13a2904ae75ef7bf1c7550c99d41a11a070321 (diff) | |
download | bash-9e51a74d57554525639a5ce59f7011386223c5c0.tar.gz |
commit bash-20100325 snapshot
Diffstat (limited to 'sig.c~')
-rw-r--r-- | sig.c~ | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -60,6 +60,8 @@ extern int executing_list; extern int comsub_ignore_return; extern int parse_and_execute_level, shell_initialized; +extern void intialize_siglist (); + /* Non-zero after SIGINT. */ volatile int interrupt_state = 0; @@ -214,7 +216,8 @@ static int termsigs_initialized = 0; /* Initialize signals that will terminate the shell to do some unwind protection. For non-interactive shells, we only call - this when a trap is defined for EXIT (0). */ + this when a trap is defined for EXIT (0) or when trap is run + to display signal dispositions. */ void initialize_terminating_signals () { @@ -248,7 +251,8 @@ initialize_terminating_signals () XSAFLAGS(i) = oact.sa_flags; /* Don't do anything with signals that are ignored at shell entry if the shell is not interactive. */ - if (!interactive_shell && XHANDLER (i) == SIG_IGN) + /* XXX - should we do this for interactive shells, too? */ + if (interactive_shell == 0 && XHANDLER (i) == SIG_IGN) { sigaction (XSIG (i), &oact, &act); set_signal_ignored (XSIG (i)); @@ -271,7 +275,8 @@ initialize_terminating_signals () XSAFLAGS(i) = 0; /* Don't do anything with signals that are ignored at shell entry if the shell is not interactive. */ - if (!interactive_shell && XHANDLER (i) == SIG_IGN) + /* XXX - should we do this for interactive shells, too? */ + if (interactive_shell == 0 && XHANDLER (i) == SIG_IGN) { signal (XSIG (i), SIG_IGN); set_signal_ignored (XSIG (i)); |