I'm trying to determine how to have my mod_perl apache server properly catch a SIGPIPE signal in a timely manner.
My environment is Apache/2.0.49 (Fedora) and mod_perl 2.
Jim, please *always* report bugs and problems following these guidelines! http://perl.apache.org/bugs/ and save yourself and us time. Thank you!
[...]In my conf.d/perl.conf file I have the following: PerlFixupHandler Apache::SIG2
Under Apache/1.3.27 and mod_perl/1.27 I had a very similar PerlFixupHandler in place (a slightly modified Apache::SIG.pm) to catch a SIGPIPE and the SIGPIPE was caught and my signal handler executed at the correct time... when the connection was broken by the browser. I would like to be able to continue to catch a SIGPIPE like this under Apache2/modperl2. Can anyone offer any suggestions as to how to get my signal handler, PIPE, executed as soon as the SIGPIPE is generated?
What perl version are you using now (and which one have you used with 1.3.x?) (which you were supposed to sent as a part of the bug report). I don't think this has anything to do with what mod_perl version you are using.
Starting from 5.8.0 perl delays signal delivery, making signals safe. For more information please see:
http://www.perldoc.com/perl5.8.4/pod/perl58delta.html#Safe-Signals
http://www.perldoc.com/perl5.8.4/pod/perlipc.html#Deferred-Signals-(Safe-Signals)
If you want to disable that perl feature, you can either recompile perl (starting from 5.8.1):
http://www.perldoc.com/perl5.8.4/pod/perl581delta.html#Unsafe-signals-again-available
http://www.perldoc.com/perl5.8.4/pod/perlrun.html#PERL_SIGNALS
Or use POSIX signal handling which bypasses perl signal mechanism: http://www.perldoc.com/perl5.8.4/pod/POSIX.html#POSIX--SigAction
Please let us know which technique has worked for you and it'd be great to have a section documenting this area, including full examples as in your original bug report.
Thanks.
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html