httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niko Goutte <ngou...@hotmail.com>
Subject RE: Stop server
Date Thu, 07 Apr 2011 09:03:51 GMT

Hi, 

I found a way to stop the server with the following command inside my module:
system("/usr/sbin/httpd -k stop");
And it works.

--Nicolas.

> Date: Thu, 7 Apr 2011 10:53:56 +0200
> From: massimo.manghi@unipr.it
> To: modules-dev@httpd.apache.org
> CC: ngoutte@hotmail.com
> Subject: Re: Stop server
> 
> what if the hardware checking thread is in a process external to Apache 
> and, if needed, runs a orderly shutdown of the webserver by running a 
> shell procedure?
> This would leave the option for automatically restarting the webserver 
> in case of a transitory hardware problem.
> 
> 
>   -- Massimo
> 
> 
> On 04/07/2011 10:13 AM, Niko Goutte wrote:
> >
> > In fact, I am not able to kill all the processes from the post_config. I can only
kill the current pid but I want to kill also all the children.
> > Do you know how to do this ?
> > Thank you.
> >
> >> From: ngoutte@hotmail.com
> >> To: modules-dev@httpd.apache.org
> >> Subject: Stop server
> >> Date: Wed, 6 Apr 2011 15:44:34 +0200
> >>
> >>
> >> Hello,
> >>
> >> I start a thread during the post_config which checks the state of the hardware
machine.
> >> If something goes wrong, this thread has to stop the Apache server.
> >> Is it possible ?
> >> For now, I am only able to kill the root process and I have to duplicate this
thread on each child in order to let them kill themselves.
> >> I hope there is a better way to stop (or kill) all the processes.
> >> (This should work in prefork or in worker mode under linux).
> >>
> >> Thank you,
> >>
> >> Nicolas.
> >>   		 	   		
> >   		 	   		
> 
 		 	   		  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message