aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2011-03-13 22:11:57 -0700
committerMax Kanat-Alexander <mkanat@bugzilla.org>2011-03-13 22:11:57 -0700
commit40769a8b8f7db1b542b37776e8139d0f338bfbf7 (patch)
treea9049239cea6e8c6a0710d35ccf47927e004a656
parentBug 637977: Re-setup CGI.pm global variables on every request under mod_perl, (diff)
downloadbugzilla-40769a8b8f7db1b542b37776e8139d0f338bfbf7.tar.gz
bugzilla-40769a8b8f7db1b542b37776e8139d0f338bfbf7.tar.bz2
bugzilla-40769a8b8f7db1b542b37776e8139d0f338bfbf7.zip
The mod_perl CGI.pm fix caused Bugzilla.pm to throw a warning on every
invocation that didn't have $SIG{TERM} and $SIG{PIPE} set (for example, during command-line scripts). https://bugzilla.mozilla.org/show_bug.cgi?id=637977
-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 {