Hi, Bastian Blank, le Mon 21 Mar 2005 10:16:26 +0100, a écrit : > On Sun, Mar 20, 2005 at 11:23:27PM +0100, Marc Dequènes wrote: > > while ((ret = poll(pfd, 1, 10)) >= 0) > > { > > if (ret == 0) > > continue; > > if (pfd[0].revents & POLLERR) > > break; > > if (pfd[0].revents & POLLIN) > > { > > printf("DATA !\n"); > > read(fd, &c, 1); > > } > > } > > > Result on linux : > > I've got 1 "DATA !" per character (including "\n"). > > Yes, linux sets POLLERR if the fifo is not readable. > > > Result on Hurd : > > I've got an infinite number of "DATA !". > > You miss the test for EOF. > > > It is like if the select state is not reset after reading. > > No, it is just a difference in the implementation. Both behaviours are > okay. > > > I tried to find the bug but i need help, this software is not an easy peace. > > As it lacks checks of return values, it can't be easy.
Should we really keep this bug opened? I agree with Bastian Blank that the program should check the result of read() so as to discover end of file. Samuel