httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <>
Subject Re: SIGALRM usage in modules?
Date Sat, 22 Nov 1997 22:13:48 GMT
It's not really available ... the only hackish way to do it is to do
things like rfc1413.c does it.  I stopped short of freeing SIGALRM for
module use.  After noting the timeout in the scoreboard, the parent is
responsible for implementing the timer.  The parent uses SIGALRM to signal
the child.  But it can only do this with shared-mem scoreboards (and when
there's actually a parent).

If you kill_timeout() you may install your own SIGALRM signal handler,
provided you restore the original IN ALL SITUATIONS before the next
request (I suggest a pool cleanup might be a good thing).  The timeout()
handler in http_main.c also handles SIGPIPE, so beware. 

Another 2.0 wishlist item: abstracted timeouts.


On Sat, 22 Nov 1997, Rasmus Lerdorf wrote:

> I have been trying to sort through the code to figure out whether setting
> an alarm in a module will interfere with Apache's alarm handling.  It is a
> bit confusing.  Is SIGALRM completely available to a module now?  It looks
> like Apache is just using the scoreboard and not actually using a real
> SIGALRM.  If someone could spend 3 minutes and outline how I might call
> alarm() safely in an Apache module, I would appreciate it.
> -Rasmus

View raw message