httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Skolnick <cl...@organic.com>
Subject Re: The Apache timeout code is still braindead? - OOPS
Date Wed, 03 Jan 1996 02:43:24 GMT

I thought there was another alarm pending here, and the use of
alarm() would mess that one up.  Perhaps apache should use non-blocking I/O
to the socket?

Cliff

On Tue, 2 Jan 1996, Nathan Schrenk wrote:

> 
> Oops...  it looks like I cut the wrong loop out of send_fd()...
> What I really meant was:
> 
> This loop
> 
> --
> while(n && !r->connection->aborted) {
>             w=fwrite(&buf[o],sizeof(char),n,c->client);
>             n-=w;
>             o+=w;
> }
> --
> 
> Could perhaps be changed to this loop:
> 
> --
> while(n && !r->connection->aborted) {
>             w=fwrite(&buf[o],sizeof(char),n,c->client);
>             n-=w;
>             o+=w;
>             if (n) {
>                 alarm(0);
>                 signal(SIGALRM,(void (*)())timeout);
>             }
> }
> --
> 
> So now what's wrong with it?  (Other than the fact that it adds the 
> overhead of a comparison and two function calls in this loop).  Will this 
> fix the timeout problem?  What problems does it introduce?  Like I 
> mentioned in my last post, I haven't looked into this very deeply.
> 
> Nathan
> 
> --
> Nathan Schrenk						nschrenk@neog.com
> Neoglyphics Media Corp.                              http://www.neog.com/
> 
> 

Mime
View raw message