httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <>
Subject Re: Return types for register-hooks and pre-config.
Date Wed, 12 Dec 2001 22:32:41 GMT
On Wednesday 12 December 2001 02:25 pm, Harrie Hazewinkel wrote:
> --On Wednesday, December 12, 2001 2:21 PM -0800 Ryan Bloom
> <> wrote:
> > On Wednesday 12 December 2001 02:14 pm, Harrie Hazewinkel wrote:
> >> HI,
> >>
> >> Some time ago the post_config phase return types was changed from
> >> void to int in order detect if a module could not be configured
> >> correctly at this phase.
> >>
> >> I was wondering if there is a reason why this was not done for
> >> the register-hooks phase and the pre-config phase??
> >
> > How could either of those two phases fail?  If you are running
> > pre-config, and it fails, then you have something very wrong with your
> > module, or your machine.  Same goes for register_hooks.  What am I
> > missing?
> For instance, if some module provides common functionality for
> other modules and there for a registration needs to be done
> which fails?? Or it needs to allocate some memory. This function
> has even 3 kinds of apr_pools_t to his disposal.
> Or for instance, the register_hooks fails where some
> memory needed to be allocated. This function after all
> gets an apr_pool_t...

But we never try to recover from an out of memory error, because it can't
be done reliably.  As for the modules relying on each other, that is why
we have optional functions, so that we can cleanly fail in a situation like
that.  I guess the argument could be made that if you can't find a function,
you may not want the server to start, but why?  If that is the case, it should
all be one module with static functions.


Ryan Bloom
Covalent Technologies

View raw message