httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Schrenk <nschr...@neog.com>
Subject Re: The Apache timeout code is still braindead? - OOPS
Date Wed, 03 Jan 1996 02:24:47 GMT

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