Mail Archives: cygwin/1998/03/12/07:58:35
> Ian Collins (Ian AT kiwiplan DOT co DOT nz)
> Wed, 11 Mar 1998 13:32:57 +1300
>
>The easiest way to describe the wrong behaviour is to run the following
>program.
>After 5 seconds it will time out.
>After another 5 seconds, the screen scrolls with continuous timeout
>messages (select returns zero).
>
>However, if you run the program and immediately input a character (don't
>forget the ENTER as the
>program doesn't set tty to raw), then the select works fine.
>
>Does anyone have an explanation/fix for this.
>
> struct fd_set readfds;
> struct timeval timeout;
> int nfound;
> int i;
> char c[1];
>
> while (1) {
> FD_SET(0,&readfds);
> timeout.tv_sec=5; /* time out after 5 seconds */
> timeout.tv_usec= 0;
> nfound = select( 1, &readfds, 0, 0, &timeout);
Looks a lot like a similar problem in lynx. The lynx fix
was to set timeout.tv_usec=5000 (we're talking milliseconds).
If that works for you, than at least cygnus is consistent.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -