httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Some Guy <>
Subject Re: Process lifetime and hooks to use
Date Sat, 17 Apr 2010 13:24:18 GMT
Thank you for your pointers.  The monitor hook seems pretty useful and
exactly what I want.  From this example
seems the hook is passed a server_rec - is this the main server?  If I have
to for some reason port this to 2.0, will spawning the thread in post_config
be my only option?

How do things change when using Worker vs. Prefork MPMs in terms of
declaring and using global vars?  I need my module to work with either of
these, so I will need to do some magic with the mpm_query.

What is the relationship between number of configuration structures created
(in the create config hook) and the number of child processes?  Are
configuration structures created once in a each child process (for each
MPM)?  If they are one to one, then it should be straightforward for what I
would like to do as I would create the lock, thread (which now checks the
mtime), and initial cache in the child_init and have them be vars in the
config structure.  In the request hook I could then grab the configuration
structure and use the lock and cache.

Is my understanding right?  Thanks,


On Sat, Apr 17, 2010 at 7:04 AM, Nick Kew <> wrote:

> On 17 Apr 2010, at 11:33, alin vasile wrote:
> > I discovered that it is :)
> >
> > Any idea how would I retrieve in this hook the module config structure?
> It seems it is not possible, as the only argument in the handler is a
> apr_pool_t structure.
> It's in the parent process, which is single-threaded.  So the usual module
> rules
> go out of the window, and you can use global/static vars in a monitor hook.
> They're not shared with the children anyway.
> --
> Nick Kew

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message