httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harrie Hazewinkel <har...@covalent.net>
Subject Re: Return types for register-hooks and pre-config.
Date Wed, 12 Dec 2001 22:46:54 GMT


--On Wednesday, December 12, 2001 2:32 PM -0800 Ryan Bloom 
<rbb@covalent.net> wrote:
>> 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.

I don't see this, but OK.

>  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?

Maybe you have common functionality which is used in multiple
modules and therefore, you put this in one common module.

> If that is the
> case, it should all be one module with static functions.

IMHO, this is not neccesarly true and it does not hurt
to provide the capability to return from the register-hooks
nad pre-config while indicating an error.

Also other things which could indicate errors in the
register-hooks and pre-config phases are for instance
the avaialability of files/directories for a perticular module.
There are many cases to think of.


On the other hand one can always doing an 'exit()',
but to avoid that the post_config now returning an int
also.


harrie

Mime
View raw message