> > while(1) {
> > FD_ZERO(&rfds);
> > FD_SET(fd,&rfds);
> > FD_SET(fileno(stdin),&rfds);
> > if( select(fd+1, &rfds, NULL, NULL, NULL ) > 0) {
(Lines removed)
> > }
>
> It looks like you are sending the original fd_set to select. Remember that
> it is modified in place.
But one would at least expect FD_ZERO() to really clean up rfds, and
after it FD_SET() is used again, for every call of select(). And this
code works fine in 2.0 kernels, and also with 2.2 and 2.4 if I'm using
named pipe and stdin. Therefore I have strong belief problem is not
usage of select() but something else.
-- M. Tavasti / tawz@nic.fi / +358-40-5078254 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/