Kernel.select does not wait for input from devices
--------------------------------------------------
Key: JRUBY-3593
URL: http://jira.codehaus.org/browse/JRUBY-3593
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.2
Environment: OSX Leopard, Ubuntu Linux 2.6.24-24-generic
Reporter: Stephen Morss
I am trying to wait on an input device for input. I do it by opening the
device (dev = open("/dev/xx", "r+"), and waiting for input by calling
Kernel.select(select([dev], nil, nil, timeout). The select call returns
immediately with an array that says there is input, but if I call dev.read,
there is nothing there (and the thread hangs indefinitely until there is). For
grins, I tried requiring 'io/wait' and then calling dev.wait(timeout), but the
wait method is not implemented in the library. Everything I am doing works
fine for native ruby 1.8.6 I read through an earlier bug report where a user
saw a similar problem using IO.select on stdin. Is this a known issue? Has
wait been left out of the io/wait library intentionally? Is there a work
around?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email