httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <>
Subject Re: why open_logs/post_config hooks are run only for the main server?
Date Sun, 21 Dec 2003 21:40:19 GMT
At 03:36 AM 12/21/2003, Stas Bekman wrote:
>We have users who want to run different post_config hooks for different vhosts. Any chance
httpd-2.0 can be changed to run the open_logs/post_config (or at least post_config) hooks
for each vhost as well? Any reason for not doing that in first place?

The issue would be that all modules presume these hooks are called once and
only once, therefore they initialize global structures presuming this entry point
won't be invoked again.

It is almost worth a totally different hook entry point (before post_config) such
as vhost_init which *would* be called per-vhost (starting from the main server
config and working through the list.)

I have several modules with the for (s=_server; s; s = s->next) paradigm that
would be easier to read using such a hook.  Although I'm generally against
adding more cpu-intensive hook phases, this is an init-only hook so it's much
easier to implement.

We might also want to revisit the child_init hook, which is once/process.
Some have asked for a per-thread init hook as well.


View raw message