SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG

BotDetect - Real-Time Bot Detection API
 
 

MAN page from Old RedHat 5.X mod_perl-1.11-3.i386.rpm

lib::Apache::SIG

Section: User Contributed Perl Documentation (3)
Updated: mod_perl-1.11
Index 

NAME

Apache::SIG - Override apache signal handlers with Perl's 

SYNOPSIS

 use Apache::SIG (); Apache::SIG->set;
 

DESCRIPTION

When a client drops a connection and apache is in the middle of awrite, a timeout will occur and httpd sends a SIGPIPE. Whenapache's SIGPIPE handler is used, Perl may be left in the middle ofit's eval context, causing bizarre errors during subsequent requestsare handled by that child. When Apache::SIG is used, it installs adifferent SIGPIPE handler which rewinds the context to make sure Perlis back to normal state, preventing these bizarre errors.

If you would like to log when a request was cancelled by a SIGPIPE in yourApache access_log, you can declare Apache::SIG as a handler (anyPerl*Handler will do, as long as it is run before PerlHandler,e.g. PerlFixupHandler), and you must also define a custom LogFormat in yourhttpd.conf, like so:

PerlFixupHandler Apache::SIGLogFormat ``%h %l %u %t \"%r\'' %s %b %{SIGPIPE}e''

If the server has noticed that the request was cancelled via a SIGPIPE,then the log line will end with 1, otherwise it will just be a dash.

As of mod_perl version 1.07_02, the Apache::SIG set method is calledby default when the server is started. 

CAVEATS

The signal handler in this package uses the subprocess_env table of themain request object to supply the `SIGPIPE' ``environment variable'' tothe log handler. If you already use the key `SIGPIPE' in yoursubprocess_env table, then you can redefine the key like this:

$Apache::SIG::PipeKey = `my_SIGPIPE';

and log it like this:

LogFormat ``%h %l %u %t \"%r\'' %s %b %{my_SIGPIPE}e'' 

AUTHORS

Doug MacEachern and Doug Bagley 

SEE ALSO

perlvar(1)
    =cut


 

Index

NAME
SYNOPSIS
DESCRIPTION
CAVEATS
AUTHORS
SEE ALSO

This document was created byman2html,using the manual pages.
 
ICM Bot detect detector