[Snip my complaining about graceful shutdown with accept mutexes in
hybrid server]
On Fri, May 07, 1999 at 03:50:32PM -0400, Me at IBM wrote:
> For problem 1, a solution is to use a server-wide non-blocking pipe to
> indicate graceful shutdown time for a child, like the one Dean
> suggested a few days ago. Each child will poll() on all its listening
> sockets as well as the pipe. The server will write one byte to the
> pipe for every child it wishes to shutdown. When the thread wakes up
> out of poll, it tries to read a byte from the pipe. If it succeeds, it
> sets the shutdown flag and dies.
And now, a patch is attached to implement this half of the solution.
This should fit pretty well with Dean's event thread model. Only the
poll-accept model is adapted in this patch, but the accept queue model
should be pretty easy to adapt as well.
Manoj
|