History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-2079
Type: Bug Bug
Status: Closed Closed
Resolution: Duplicate
Priority: Major Major
Assignee: Charles Oliver Nutter
Reporter: Vladimir Sizikov
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
JRuby

IO#select does not work with nor File nethiner stdio streams

Created: 06/Feb/08 12:53 PM   Updated: 23/Apr/08 10:08 AM
Component/s: Core Classes/Modules
Affects Version/s: JRuby 1.1RC1
Fix Version/s: None

Time Tracking:
Not Specified

Environment: Latest JRuby 1.1RC1
Issue Links:
Related
 


 Description  « Hide
IO#select always returns nil with JRuby, when Files or standard streams are used:

p select(nil, [STDOUT], nil, 40) # == > nil

f = File.open("/tmp/blah.txt", "r+")
p select(nil, [f], nil, 40) #==> nil
f.close

Looking at the code, in registerSelect(), there is a check:
channel instanceof SelectableChannel

And the method does nothing for non-selectable channels.
Both, file channels and stdio channels are non-selectable, so they don't work.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Vladimir Sizikov - 06/Feb/08 01:39 PM
Linked to similar bug I just discovered in the issues list.

Charles Oliver Nutter - 15/Feb/08 12:58 PM
Punting issues from 1.1 RC2 to 1.1 final.

Charles Oliver Nutter - 15/Feb/08 03:46 PM
There's already a bug for select on stdio (which may not be possible to support on Java through normal means).