You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Martin Kraemer <ma...@mch.sni.de> on 1998/12/23 11:18:29 UTC

[PATCH] What to do with ENETDOWN in accept() ?

Hi again,

Many OS's offer the possibility to terminate/stop/restart the network
layer on command. In this situation, a program that tries socket
operations (accept() in the Apache child case) will get an errno of
ENETDOWN.

What is the appropriate/preferred solution to deal with this _AND_
avoid the father process looping and starting children which die
immediately?

Should the children return APEXIT_CHILDFATAL?

Or is it sufficient to clean_child_exit(1) as is done today,
because the parent's network operations will fail as well, and it
will then exit?
(I *think* the latter is sufficient)

The best solution was if the parent would wait until the network
layer is up again. (Again I *think* it does that now - in 1-sec
intervals. Will it fork new children each time?).

    Martin
-- 
<Ma...@Mch.SNI.De>      |        Siemens Information and
Phone: +49-89-636-46021          |        Communication  Products
FAX:   +49-89-636-47816          |        81730  Munich,  Germany

Re: [PATCH] What to do with ENETDOWN in accept() ?

Posted by Ben Hyde <bh...@pobox.com>.
Ben Laurie writes:
>Surely the parent doesn't (normally) do any network operations?

Syslogd logging, normal?  You be the judge. - ben

Re: [PATCH] What to do with ENETDOWN in accept() ?

Posted by Ben Laurie <be...@algroup.co.uk>.
Martin Kraemer wrote:
> Or is it sufficient to clean_child_exit(1) as is done today,
> because the parent's network operations will fail as well, and it
> will then exit?
> (I *think* the latter is sufficient)

Surely the parent doesn't (normally) do any network operations?

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686| Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org/
and Technical Director|Email: ben@algroup.co.uk |
A.L. Digital Ltd,     |Apache-SSL author     http://www.apache-ssl.org/
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache/