Hello,

I'd like to ask what is the intended behaviour of
 Apache2::ServerUtil->server->push_handlers(PerlCleanupHandler => ...)
compared to
 Apache2::RequestUtil->request->push_handlers(PerlCleanupHandler => ...)

On my Ubuntu 8.10 (mod_perl 2.0.4, apache 2.2.9) cleanup handlers
installed on $s seem to be called after *every* request but handlers
installed on $r are called only *once* after the *current* request. On a
RedHat ES 5 (mod_perl 2.0.2, apache 2.2.3) cleanup handlers on $s look
like they are never called.

I found and old list message suggesting that cleanup handlers on $s are
called when the server is terminated, but this doesn't seem to be the
case (and looks strange since we have PerlChildExitHandler for that). In
the documentation of handlers, there is no mention of where each handler
must be installed and whether it makes a difference.


NOTE: on my Ubuntu, a cleanup handler installed on $s is called only if
there are also other types of handlers on $s. In the Changelog of the
*threading branch* I found the following message

  Now correctly invokes PerlCleanupHandlers, even if they are the only
  handler type configured for that request [Torsten Foertsch]

this comes from r594609 but it was not merged for 2.0.4. This maybe
happens also for $r handlers, but on my setup $r has always at least a
PerlResponseHandler so I'm not sure.


Thanks in advance,
Kostas

Reply via email to