Jon Jensen wrote:
> 
> On Wed, 20 Mar 2002, Stas Bekman wrote:
> 
> > Jon Jensen wrote:
> > >
> > > Within mod_perl, I would like to know the pid of the master Apache daemon,
> >
> > perldoc -f getppid
> 
> Thanks, Stas. I should've found that. I'm still interested in getting the
> PidFile setting at runtime, but can live without it if I have to.

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.

HTH

--Geoff

Reply via email to