httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Schrenk <>
Subject Re: Timeout patch
Date Tue, 23 Jan 1996 20:04:40 GMT
On Tue, 23 Jan 1996, David Robinson wrote:

[code removed]

> Hmm, isn't there a race condition here? What happens if it times out just
> after sucessful fwrite, but before the alarm call?

Bad things would happen when the connection was aborted in the 
timout() signal handler and then control returned to send_fd().

> I think this may be better solved with a reset_timeout() routine inside
> http_main.c which could deal with any race conditions.

This reset_timeout() routine is a good idea, and will eliminate the need
for timeout_name being a global.  When I get a minute, I will rewrite the
patch and resubmit it.  Any suggestions on safeguarding reset_timeout() 
against a similar race condition?  Perhaps block_alarms()/unblock_alarms() 
should be stuck around the alarm resetting code?


>  David.

Nathan Schrenk
Neoglyphics Media Corp.                    

View raw message