httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <field...@kiwi.ICS.UCI.EDU>
Subject Re: lingerout()
Date Mon, 14 Apr 1997 04:07:58 GMT
>http_main.c:
>
>	static void lingerout(sig) 
>	int sig; 
>	{
>	    if (alarms_blocked) {
>		alarm_pending = 1;
>		return;
>	    }   
>		    
>	    if (!current_conn) {
>	#if defined(USE_LONGJMP)
>		longjmp(jmpbuffer,1);
>	#else
>		siglongjmp(jmpbuffer,1);
>	#endif
>	    }   
>	    current_conn->aborted = 1;
>	}   
>
>That doesn't look right to me.  This is doing something similar to a 
>soft_timeout but it needs to do something similar to a hard_timeout.

The difference between a soft_timeout and a hard_timeout is that the
former needs to check for the abort condition before repeating a
possibly-blocked action.

>This is bad, especially if the system restarts system calls.  I haven't
>looked in too much detail, but there has been a report or two of 
>processes hanging in 1.2b8; perhaps this is the cause?

Hmmmm, the calls to shutdown, select, and read cannot be restarted and
the first EINTR will cause the lingering to end.  Ah crap, the place
where it might occur is in bflush(), where it is looping on EINTR instead
of returning with -1.  I can't think of any case where we would want
a flush to continue after a signal is received, so I think that is bogus.

.....Roy

Mime
View raw message