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