[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-modperl
Subject: Re: Accessing Apache master process pid
From: Jon Jensen <johann () swelter ! net>
Date: 2002-03-26 20:37:46
[Download RAW message or body]
On Wed, 20 Mar 2002, Geoffrey Young wrote:
> > > Jon Jensen wrote:
> > > >
> > > > Within mod_perl, I would like to know the pid of the master Apache daemon,
>
> well, here's one other way:
>
> <Perl>
> $Apache::Server::SaveConfig = 1;
> $PidFile = 'logs/httpd.pid';
> </Perl>
>
> PerlInitHandler 'sub { warn "The parent pid file is: ", \
> shift->server_root_relative($Apache::ReadConfig::PidFile)}'
>
> yeilds:
> The parent pid file is: /usr/local/apache/logs/httpd.pid at (eval 312)
> line 1.
>
> if you really need access to ap_pid_fname() that looks easy enough,
> but justification for needing it would help doug make the
> architectural decision whether to include it or not in core.
My main motivation is the Don't Repeat Yourself principle -- I'd like to
be able to find out the name of the pidfile without duplicating its name
and location anywhere in the configuration, and since Apache already knows
it, I can't think of a reason mod_perl shouldn't expose it.
But either way, life will go on. :)
Jon
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic