From: Max Kanat-Alexander Date: Mon, 14 Mar 2011 05:11:57 +0000 (-0700) Subject: The mod_perl CGI.pm fix caused Bugzilla.pm to throw a warning on every X-Git-Tag: bugzilla-4.1.1~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=40769a8b8f7db1b542b37776e8139d0f338bfbf7;p=thirdparty%2Fbugzilla.git 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 --- diff --git a/Bugzilla.pm b/Bugzilla.pm index 9d7199ff6f..2f657e3ded 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 {