summaryrefslogtreecommitdiffstats
path: root/Bugzilla.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r--Bugzilla.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm
index 9d7199ff6..2f657e3de 100644
--- a/Bugzilla.pm
+++ b/Bugzilla.pm
@@ -650,8 +650,9 @@ sub _cleanup {
# These are both set by CGI.pm but need to be undone so that
# Apache can actually shut down its children if it needs to.
- $SIG{TERM} = 'DEFAULT' if $SIG{TERM} eq 'IGNORE';
- $SIG{PIPE} = 'DEFAULT' if $SIG{PIPE} eq 'IGNORE';
+ foreach my $signal (qw(TERM PIPE)) {
+ $SIG{$signal} = 'DEFAULT' if $SIG{$signal} && $SIG{$signal} eq 'IGNORE';
+ }
}
sub END {