httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Terbush <ra...@zyzzyva.com>
Subject Re: [PATCH] Tiny changes to main child loop, lingering_close
Date Mon, 17 Feb 1997 16:28:25 GMT

+1

> I thought of these while waking up this morning, but figured that
> it would be better to commit the big tested patch first.  They just
> avoid some possible intercept conditions.
> 
> .....Roy
> 
> Index: http_main.c
> ===================================================================
> RCS file: /export/home/cvs/apache/src/http_main.c,v
> retrieving revision 1.121
> diff -c -r1.121 http_main.c
> *** http_main.c	1997/02/16 23:32:32	1.121
> --- http_main.c	1997/02/17 04:28:52
> ***************
> *** 319,325 ****
>   
>       /* Prevent a slow-drip client from holding us here indefinitely */
>   
> -     kill_timeout(r);                 /* Remove any leftover timeouts */
>       hard_timeout("lingering_close", r);
>   
>       /* Send any leftover data to the client, but never try to again */
> --- 319,324 ----
> ***************
> *** 337,342 ****
> --- 336,342 ----
>   	if (errno != ENOTCONN)
>   	    log_unixerr("shutdown", NULL, "lingering_close", r->server);
>   	bclose(r->connection->client);
> + 	kill_timeout(r);
>   	return;
>       }
>   
> ***************
> *** 1579,1584 ****
> --- 1579,1585 ----
>   #endif    
>   
>       while (1) {
> + 	int errsave;
>   	BUFF *conn_io;
>   	request_rec *r;
>         
> ***************
> *** 1625,1634 ****
> --- 1626,1638 ----
>   #else
>               srv = select(listenmaxfd+1, &main_fds, NULL, NULL, NULL);
>   #endif
> +             errsave = errno;
> + 
>               sync_scoreboard_image();
>               if (scoreboard_image->global.exit_generation >= generation)
>                   exit(0);
>   
> +             errno = errsave;
>               if (srv < 0 && errno != EINTR)
>                   log_unixerr("select", "(listen)", NULL, server_conf);
>   




Mime
View raw message