On 26 Jun 2007, at 13:44, Geoffrey Young wrote:



Mark Blackman wrote:
The problem: PerlChildInitHandler handler appears to runs in the parent
instead of the child.

After duplicating the code in
http://perl.apache.org/docs/2.0/user/handlers/server.html
for MyApache2::Startuplog.pm in the following environment.

Apache/2.2.4 (Unix) mod_ssl/2.2.4 OpenSSL/0.9.7i mod_perl/2.0.3 Perl/v5.8.8

The output from the ChildInitHandler suggests that it's being run in the
parent, ie.

[Tue Jun 26 11:21:24 2007] - open_logs : process 8054 is born to reproduce
[Tue Jun 26 11:21:24 2007] - post_config: configuration is completed
[Tue Jun 26 11:21:24 2007] - END        : process 8054 is shutdown
--------------------
[Tue Jun 26 11:21:34 2007] - open_logs : process 8057 is born to reproduce
[Tue Jun 26 11:21:34 2007] - post_config: configuration is completed
[Tue Jun 26 11:21:34 2007] - child_init : process 8057 is born to serve [Tue Jun 26 11:21:34 2007] - child_init : process 8057 is born to serve [Tue Jun 26 11:21:34 2007] - child_init : process 8057 is born to serve [Tue Jun 26 11:21:34 2007] - child_init : process 8057 is born to serve [Tue Jun 26 11:21:34 2007] - child_init : process 8057 is born to serve

I note that this issue appears to have been noted at least once before.

http://mail-archives.apache.org/mod_mbox/perl-dev/200206.mbox/% [EMAIL PROTECTED]


and fixed of course.

This looks like a bug to me, but I thought I would confirm with this
list before reporting
as such.

I suspect that doug's original fix probably wasn't undone, but that
instead you're running into some iteration of this problem with how perl
itself represents the pid:

  http://marc.info/?t=106632745100005&r=1&w=2

Thanks, that's interesting, although calling POSIX::getpid presents
the same value as $$.


so, if you have the ability, you might want to try the same experiment
with a non-threaded perl and prefork mpm and see if you have the same issue.

The example above was a non-threaded perl and prefork mpm.


other than that I really don't know - there were a few different pid
issues floating around, iirc, all having to do with how $$ behaves (as
opposed to what is really going on)

sorry I'm not of more help.

no worries, the getppid stuff is interesting anyway.

Cheers,
Mark

--Geoff

Reply via email to