From: Pat Mahoney Date: 2003-01-03T13:33:13+09:00 Subject: Re: sysread of /dev/video with threads On Thu, Jan 02, 2003 at 12:13:03PM +0900, Yukihiro Matsumoto wrote: > Hmm, probably select(2) does not show "ready" for /dev/video0 for your > system. Could you try > > ruby -e 'p IO.select([File.open("/dev/video0")])' > I fiddled around with the gqcam source code, and added a select(2) call just before the read(2) call which reads a frame of video. Here too, select(2) never reports "ready" yet read(2) works fine, so I assume it is the correct behavior. According to the manpage, select(2) does not return when one can read from the file descriptor, but when one can read from the file without blocking... (I must admit, this means little to me) I assume it is the ruby threads which introduce a select call? Well, thanks for all the help. It seems I need to learn a bit more before I can think about solving the problem. -- Pat Mahoney