I decided to do prefork first, since it seems the more complicated out
of the MPM's to stop gracefully. I've tested locally, using

        #!/bin/sh

        echo "Content-type: text/plain"
        echo

        while true; do
                sleep 1
                date
        done

as my ultra-sophisticated long-lived download, however I would be amazed
if running two instances of httpd concurrently does not break some
things (esp third party modules which use some kind of lockfile or
on-disk state). So, heads up there on any trunk-runners.

I'm going to add yet more documentation to stopping.xml, to describe
those kind of issues.

On Fri, Aug 26, 2005 at 04:09:58PM -0000, [EMAIL PROTECTED] wrote:
> Author: colm
> Date: Fri Aug 26 09:09:54 2005
> New Revision: 240270
> 
> URL: http://svn.apache.org/viewcvs?rev=240270&view=rev
> Log:
> 
> Implement a "graceful-stop" for the prefork MPM (might aswell do the hard one
> first). 
> 
> General approach is to send SIGUSR1 to all children (which will de-listen, and
> exit when finished), and to gather all children as they exit. 
> 
> We don't use a sleep(timeout) for the timeout implementation, because this
> would lead to a rut of defunct children until the timeout had expired.
> 
> set_graceful_shutdown stolen from Ken Coar. See <[EMAIL PROTECTED]>
> (28 Mar 2003).
> 
> 
> Modified:
>     httpd/httpd/trunk/CHANGES
>     httpd/httpd/trunk/server/mpm/prefork/mpm.h
>     httpd/httpd/trunk/server/mpm/prefork/prefork.c
-- 
Colm MacCárthaigh                        Public Key: [EMAIL PROTECTED]

Reply via email to