You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by John Siracusa <si...@gmail.com> on 2008/02/08 02:00:10 UTC

Run code just before the original apache process forks

Is there some hook or other way to run some Perl code just before the very
first fork() of the original apache process?  The "manual" way is to put the
code at the very end of the last Perl file evaluated during server start-up,
but I'm looking for some way that I can do that on behalf of the user from
within a module that is loaded at some point during startup.  (This is
mod_perl 1.x.)  Any ideas?

-John



Re: Run code just before the original apache process forks

Posted by Perrin Harkins <pe...@elem.com>.
On Feb 7, 2008 8:00 PM, John Siracusa <si...@gmail.com> wrote:
> Is there some hook or other way to run some Perl code just before the very
> first fork() of the original apache process?  The "manual" way is to put the
> code at the very end of the last Perl file evaluated during server start-up,
> but I'm looking for some way that I can do that on behalf of the user from
> within a module that is loaded at some point during startup.  (This is
> mod_perl 1.x.)  Any ideas?

Sorry, there's a hook on mod_perl 2, but not 1.  For mp1 I think
you'll have to get users to put something in their conf file to run
your code.

- Perrin