httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: select
Date Sat, 18 Jan 1997 23:46:02 GMT
Well I thought about that too and I figured that if we still have an
alarm() going then the effect is really the same... but if we've removed
the alarm() then yeah this should be changed. 

Dean

On Sat, 18 Jan 1997, Marc Slemko wrote:

> On Sat, 18 Jan 1997, Jim Jagielski wrote:
> 
> > Ack, that's right... it always modifies them.
> 
> And, while we have people puzzling over the code, do we agree that this
> select will possibly screw up on linux?  Linux modifies the tv to be the
> number of seconds remaining to wait if it exits before the timeout.  If I
> read it right, this means that under Linux the code will wait a _total_
> time of tv no matter how often new data comes back, instead of waiting
> until an interval of tv passes with no new data. 
> 
> ...so tv should be reinitalized each time through the select, no?
> 
> 
>     while ((select_rv = select (sd + 1, &fds_read, NULL, &fds_err, &tv))
> 0) {
>         if ((read_rv = read (sd, dummybuf, sizeof(dummybuf))) <= 0)
>             break;
>         else {
>             fds_read = fds; fds_err = fds;
>         }
>     }
> 
> 
> 


Mime
View raw message