httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Sutton <>
Subject Re: [PATCH] revised death wish on HUP patch
Date Fri, 14 Feb 1997 15:34:11 GMT
On 14 Feb 1997, Paul Richards wrote:
> When I looked at the problem with signal handling a few months ago I
> thought I commented on the fact that the children are *not* passed a
> signal at all. They are allowed to die naturally when they finish
> processing the request. Are we changing that model? I've been trying to
> catch up on two weeks mail (annual accounts audit and Phd viva both the
> same week!) so I've skimmed quite a lot recently and might not be up to
> speed on the problem. Someone want to give me a quick summary?

Erm, I thought Apache had always sent the children HUPs to kill em
immediately, which was the reason why graceful restarts are needed -- to
let transfers in progress finish. 

At the moment the parent

  1   Sends a -HUP to the children (in the process group)
  2   Closes the bound sockets
  3   Opens the bound sockets
  4   Re-makes the children

The problem is that if a child doesn't die before 3, the bind fails and
Apache dies (no children). Not good. This patch tries harder to kill the
children, by extending part 1: 

  1a  Send -HUP to children in process group
  1b  Send a -HUP to any children still alive, and wait 3 seconds
  1c  Send a -TERM to any children still alive, and wait 3 seconds
  1d  Send a -KILL to any children skill alive, and wait 3 seconds

Parts 1b, 1c and 1d are only done if there are still children hanging

This reduces the change of Apache-death during a routine HUP, which
is a good thing.


View raw message