httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <>
Subject Re: Oh sod it
Date Tue, 25 Jun 1996 19:42:12 GMT
Robert S. Thau wrote:
>   The only neat way I can see around this
>   involves sending the children a signal which is blocked everywhere except in
>   the select in the main loop.
> How about sending the children a single which is *never* blocked, and
> whose sole effect is to set a flag which makes them stop accepting new
> connections?  (I think I called this the "time_to_die" flag in a previous
> note on this general subject...).

The problem is that a signal will interrupt any system call in progress. I
haven't looked to see how well they are protected but I imagine that not all of
them are. The cool way to deal with this is to block the signal everywhere
except where you want to receive it.

Of course, there is an interesting race condidition between where the signal
is unblocked and the blocking system call, but I guess in we can live with it
in this context (though I do have a cute fix if needed).



> rst

Ben Laurie                  Phone: +44 (181) 994 6435
Freelance Consultant and    Fax:   +44 (181) 994 6472
Technical Director          Email:
A.L. Digital Ltd,           URL:
London, England.

View raw message