httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Schrenk <nschr...@neog.com>
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?

Nathan

>  David.

--
Nathan Schrenk						nschrenk@neog.com
Neoglyphics Media Corp.                              http://www.neog.com/


Mime
View raw message