The problem: PerlChildInitHandler handler runs in the parent instead of
the child
Consider:
PerlModule Apache::ChildInit
PerlChildInitHandler Apache::ChildInit
package Apache::ChildInit;
use strict;
use Apache::Log;
use Apache::Const -compile => 'OK';
sub handler {
Apache->warn("warn: Starting child process $$");
return Apache::OK;
}
1;
always prints the PID of the parent. Both worker and prefork. The "same"
code works fine in 1.x (printing child PIDs).
For example for prefork the setup is:
<IfModule prefork.c>
StartServers 2
MinSpareServers 2
MaxSpareServers 3
MaxClients 3
MaxRequestsPerChild 0
</IfModule>
---
Also ap_hook_child_init() doesn't expect any return value, why does
PerlChildInitHandler? 1.x's version doesn't require it. 2.0's prints
undef warnings if the value is not returned.
---
Also shouldn't this work:
PerlChildInitHandler +Apache::ChildInit
since it doesn't.
__________________________________________________________________
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]