You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Chris Williams <ch...@cmguc.com> on 2001/12/12 15:57:45 UTC

Creating a mod with 2.0 question...

I am building a mod for apache 2.0 and have a question.  I have defined a
function for the child_init hook.  While in the function, I do some
initialization.  If my mod initialization fails, I want to prevent apache
from starting up.  Is there a function or state I can set for this to
happen?  I am already placing comments in the error_log.  Not sure if it
matters but my mod will be dynamically loaded.

Thanks!
Chris


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Creating a mod with 2.0 question...

Posted by Ryan Bloom <rb...@covalent.net>.
On Wednesday 12 December 2001 06:57 am, Chris Williams wrote:
> I am building a mod for apache 2.0 and have a question.  I have defined a
> function for the child_init hook.  While in the function, I do some
> initialization.  If my mod initialization fails, I want to prevent apache
> from starting up.  Is there a function or state I can set for this to
> happen?  I am already placing comments in the error_log.  Not sure if it
> matters but my mod will be dynamically loaded.

You can't really do that, because the parent process won't know what is going 
on.  You could exit the child process, and that would effectively stop the server,
but you would thrash starting and stoping processes, which is not good.

The other option is to put a note in the scoreboard, and have the parent
process use that note to determine that it should shut down, but the parent
doesn't have that logic today.

Ryan

>
> Thanks!
> Chris
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

-- 

______________________________________________________________
Ryan Bloom				rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org