summaryrefslogtreecommitdiff
path: root/sig.c~
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2011-12-12 21:56:29 -0500
committerChet Ramey <chet.ramey@case.edu>2011-12-12 21:56:29 -0500
commit9e51a74d57554525639a5ce59f7011386223c5c0 (patch)
tree2b1cb7afbcfb284fdbb2f4730e919a9dc91d3f83 /sig.c~
parent1b13a2904ae75ef7bf1c7550c99d41a11a070321 (diff)
downloadbash-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
diff --git a/sig.c~ b/sig.c~
index a217b894..60cdf6cb 100644
--- a/sig.c~
+++ b/sig.c~
@@ -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));