Re: is select still broken on hurd ?
Hi Junichi!
It appears that select() still might be broken. The
tests I did with the attached code, as well as an
example in the select manpage on Hurd, indeed fails.
Funny thing is that for any value of tv_sec > 0 it
works OK. And for any value of tv_usec > 999 (when
tv_sec is zero) it also works ... so maybe timeouts
less than 1 sec is ignored for some reason?
Regards
/Joachim
On Wed, Jan 29, 2003 at 03:14:50PM +0900, Junichi Uekawa wrote:
> 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: