httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kraemer <>
Subject Re: Parent death should force children suttee
Date Thu, 31 Jan 2002 22:34:45 GMT
On Wed, Jan 30, 2002 at 04:36:24PM -0500, Jim Jagielski wrote:
> When the parent dies, it's bad. No doubt. You might be able to
> muddle through, but it's a scenario where you're just waiting for
> badness to happen.

But it's easier to handle if you have a cron job which monitors the
parent and restarts if it died (assuming it took the children
with it) than to catch the fleas which have escaped the opened can
(errr, to find all child processes once the parent has died).

No doubt, we don't want to be offline for a second.

But the top prio is making the PARENT as stable as it used to be
in 1.3, and that means we should let the children die once their
parent has gone (to test that, a kill (getppid(), 0) would do, or
maybe even getppid() returns 1 if the parent has died? must try...).

If the parent has gone, we can then easily restart it (without looking
for bazillions of running children first). I would NOT let them continue
running in such a situation.

> Unfortunately, I can't think of a very good solution... Some sort
> of extra parent process watchdog process would allow "us" to note
> the parent death... 

# while sleep 30
> do
>   kill -0 `cat httpd-2.0/logs/` || httpd-2.0/sbin/apachectl start
> done &

What's the problem? You WILL get problems (port in use) if the children
don't die, though.

Jus' my 2¢, (EURO ¢ though)

<>         |     Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730  Munich,  Germany

View raw message