[EMAIL PROTECTED] writes:

> > I'm pretty sure that Ryan disagrees with the path I took for SIGHUP,
> > which is to kill everybody we can with the pod (since that is the most
> > clean and reliable mechanism we have) and let
> > ap_reclaim_child_processes() handle the stragglers.
> 
> You can't use the pod to gracelessly shutdown the child processes.  It
> doesn't do that.  The pod will only work for graceful shutdowns.

that's sort of what I said...  we start off like graceful (everybody
that dies from the pod dies cleanly) and then
ap_reclaim_child_processes() knocks everybody else out with SIGTERM
 
> > With this patch, SIGWINCH and SIGHUP basically work for me on a
> > particular machine :)
> 
> Does SIGHUP actually do a graceless shutdown on a heavily loaded
> machine?

sure, but ap_reclaim_child_processes() does the heavy lifting

> There are only two options for gracelessly killing a child process, that I
> know of.
> 
> 1)  Use signals.
> 
> 2)  Have a thread that is specifically used to listen for some other
> out-of-band communication.
> 
> Since we are in an MPM that doesn't have threads, signals are the only way
> I know of to implement a graceless shutdown.  The pod will not be able to
> do this.

by the way... what are you thinking about w.r.t. threads?

---------/-----------

At this point, hopefuly everybody recognizes that signals are used for
graceless shutdown in my patch and we can have a more useful
discussion.

One thing I wanted to avoid was having a SIGHUP handler in the server
process which calls clean_child_exit(), because we have no idea what
mutexes we were holding before being interrupted by a signal.  We ran
into this previously with threaded, and though prefork should have
less chance of this problem we don't know what libc and plugin modules
will be doing.

For graceless shutdown I'm inserting a first step which gets
some of the server processes out of the way before I do what I'm
afraid of.  (Yeah, this doesn't make much sense in terms of a 100%
solution.  It is more a way to minimize risk.)

Did you want the SIGHUP handler in the child process to be just_die()?

-- 
Jeff Trawick | [EMAIL PROTECTED] | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Reply via email to