[rt-devel] patch to localize die/warn handlers under mod_perl

Maurice Aubrey maurice at redweek.com
Fri May 16 05:16:09 EDT 2003


Please consider this very simple patch to RT 2.0.15 that localizes the
warn and die handlers so normal error handling is restored at the end of
each mod_perl-served RT request.

It looked to me like it would apply to 3.x too but I didn't attempt it.
A similar change might make sense for other environments (e.g, fast cgi)?

Thanks,

Maurice

diff -ur rt-2-0-15-gold/bin/webmux.pl rt-2-0-15/bin/webmux.pl
--- rt-2-0-15-gold/bin/webmux.pl        2002-07-12 21:19:54.000000000 -0700
+++ rt-2-0-15/bin/webmux.pl     2003-05-16 01:55:29.000000000 -0700
@@ -126,6 +126,9 @@

 sub handler {
     ($r) = @_;
+
+    local $SIG{__WARN__};
+    local $SIG{__DIE__};

     RT::Init();




More information about the Rt-devel mailing list