Re: Select with device and stdin not working

M. Tavasti (tawz@nic.fi)
25 Jul 2001 18:27:14 +0300


"Richard B. Johnson" <root@chaos.analogic.com> writes:

> Change:
> } else if(FD_ISSET(fileno(stdin),&rfds) ) {
> To:
> } if(FD_ISSET(fileno(stdin),&rfds) ) {
>
> Both of these bits can be (probably are) set.

You are third person to suggest that. Yes, it's good point, but
doesn't make any difference. Or it makes when both device and stdin
have something, stdin is read on second round.

But now there is nothing coming from device, and typing + pressing
enter won't make select() return like it should.

Same binary works fine with 2.0.X kernels, or if I'm having stdin
+ pipe (named or unnamed, doesn't matter). And when trying with 2.0
kernel, system was totally same except kernel version.

Anybody, can you get select working *properly* with stdin+/dev/random?
If you can, then there must be some mistake on my code.

-- 
M. Tavasti /  tavastixx@iki.fi  /   +358-40-5078254
 Poista sähköpostiosoitteesta molemmat x-kirjaimet 
     Remove x-letters from my e-mail address
-
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/