httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Meyer <>
Subject Re: How to init an mmaped file?
Date Tue, 26 Oct 2010 18:36:11 GMT
On Tue, 26 Oct 2010 10:03:11 +0100
Nick Kew <> wrote:

> On 26 Oct 2010, at 03:52, Mike Meyer wrote:
> > Anyone got some hints on how I ought to set this up? Maybe there's a
> > writeup somewhere I missed on config processing  Possibly there's some
> > facility that I ought to be looking at to replace the mmaped file?
> One possible suggestion.  post_config and child_init get passed
> the first server_rec.  The server_rec in any later hook is the
> virtual host.  Could your problem be setting data in one server
> then trying to retrieve it from another?

That indeed appears to be the case (Sorin got this also, pointing out
that it comes from using a virtual server).

Since I want this to work properly with multiple virtual servers mapping
different files, I'd like this to work. To me, the obvious place to
put this would be the config merge hook, except that doesn't get
passed a copy of the server rec, and the pool it gets passed is
apparently different (or possibly reset) between invocations, so the
trick of using pool_userdata to skip doing this during the config
check doesn't work.

I don't see a hook that's obviously convenient for this. Maybe there's
one with a non-obvious name? Barring that, it would seem that I have
to have both my post_config hook and child_init hook walk through the
servers checking their config to see if my module is enabled, and
setting them up appropriately.

Any pointers to code that does that? Maybe a better way to approach
the problem?

Mike Meyer <>
Independent Network/Unix/Perforce consultant, email for more information.

O< ascii ribbon campaign - stop html mail -

View raw message