You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Javier Alvarado <ja...@inktomi.com> on 2003/07/02 03:53:13 UTC
Re: Detecting graceful restart -> wacky $$
Never mind. It was a mistake on my part. I was setting it with
push_handler() in my startup.pl, so of course it didn't persist. Once I
switched to setting it in the httpd.conf it was called on every restart,
graceful or not.
Now I'm having a different problem. In my restart handler I print out
the PID using a simple 'warn "pid = $$\n". I was expecting it would
print out the PID of the parent (listener) Apache process, but the PID
that is printed does not exist in the process table, and is in fact the
real Apache parent PID - 1. Getting the PID with POSIX::getpid produces
the same result.
I'm baffled by this. Can anyone shed any light?
Javier wrote:
> Hello,
>
> Does anyone know if it's possible to hook into Apache
> graceful restarts?
>
> I tried PerlRestartHandler, but it doesn't seem to get
> called. I see it called when I do apachectl startssl,
> but not apachectl restart nor apachectl graceful.
>
> None of the documentation I've found mentions wheter
> it gets called only for plain restarts or for graceful
> restarts also.
>
> Thanks!
>
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
Re: Detecting graceful restart -> wacky $$
Posted by Bruno Connelly <br...@whack.org>.
Javier> Now I'm having a different problem. In my restart handler I
Javier> print out the PID using a simple 'warn "pid = $$\n". I was
Javier> expecting it would print out the PID of the parent
Javier> (listener) Apache process
[...]
Sounds like you want getppid() instead.
b.
--
/* Bruno Connelly, <br...@whack.org> */