]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
The mod_perl CGI.pm fix caused Bugzilla.pm to throw a warning on every
authorMax Kanat-Alexander <mkanat@bugzilla.org>
Mon, 14 Mar 2011 05:11:57 +0000 (22:11 -0700)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Mon, 14 Mar 2011 05:11:57 +0000 (22:11 -0700)
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

Bugzilla.pm

index 9d7199ff6f42ce377a0a2ec2eacf7d629b72b51a..2f657e3deda4e68f28d82481ef2f07596ace1b04 100644 (file)
@@ -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 {