[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

is select still broken on hurd ?



retitle 79358 select() doesn't work properly on hurd
thanks

Is select() still broken on hurd ?



regards,
	junichi


quote original text:
> 
> When the timeout value in a call to select() is small (less than about
> 1000 usec) select returns 0, even if the file descriptors have changed.
> I'm using the Hurd version 20001204.
> 
> The following program does not work under Hurd:
> 
> #include <stdio.h>
> #include <sys/time.h>
> #include <unistd.h>
> 
> int main(int argc, char **argv)
> {
>   fd_set fds;
>   struct timeval tv;
> 
>   FD_ZERO(&fds);
>   FD_SET(1, &fds);
>   tv.tv_sec = 0;
>   tv.tv_usec = 0;
> 
>   printf ("Press Enter\n");
>   fflush(stdout);
> 
>   sleep(3);
> 
>   if (!select(2, &fds, NULL, NULL, &tv))
>     printf("You did not push ENTER\n");
>   else
>     printf("You pushed ENTER\n");
> 
>   return 0;
> }
> 
> Increasing the timeout value for the select causes it to work properly.
> 



Reply to: