httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@gonzo.ben.algroup.co.uk>
Subject Re: SIGPIPE and timeout on Solaris (solved apparently)
Date Tue, 02 Apr 1996 09:39:39 GMT
> 
> 
> I made the following change to http_protocol.c and it seems to
> have fixed the problem. Could someone give me a one liner on
> how to commit this, and give me commit permissions?

This patch is wrong. It is not correct to check errno unless you have already
seen an error return. I would suggest a simple "if(w <= 0) break;" instead.
Of course, the following code should deal with the matter appropriately, too.

> 
> 
> 
> *** http_protocol.c.orig	Mon Apr  1 18:48:21 1996
> --- http_protocol.c	Mon Apr  1 18:43:42 1996
> ***************
> *** 718,726 ****
>           o=0;
>   	total_bytes_sent += n;
>   	
> !         while(n && !r->connection->aborted) {
>               w=bwrite(c->client, &buf[o], n);
> ! 	    if (w)
>   	        reset_timeout(r); /* reset timeout after successfule write */
>               n-=w;
>               o+=w;
> --- 718,726 ----
>           o=0;
>   	total_bytes_sent += n;
>   	
> !         while(errno != EPIPE && n && !r->connection->aborted)
{
>               w=bwrite(c->client, &buf[o], n);
> ! 	    if (w > 0)
>   	        reset_timeout(r); /* reset timeout after successfule write */
>               n-=w;
>               o+=w;
> 
> 

-- 
Ben Laurie                  Phone: +44 (181) 994 6435
Freelance Consultant and    Fax:   +44 (181) 994 6472
Technical Director          Email: ben@algroup.co.uk
A.L. Digital Ltd,           URL: http://www.algroup.co.uk
London, England.


Mime
View raw message