Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JRuby 9k-pre2 throws IOError when reading from $stdin #2959

Closed
ghost opened this issue May 19, 2015 · 1 comment
Closed

JRuby 9k-pre2 throws IOError when reading from $stdin #2959

ghost opened this issue May 19, 2015 · 1 comment

Comments

@ghost
Copy link

ghost commented May 19, 2015

When using a background thread that blocks until input is read via

$stdin.gets.chomp

the thread encounters an IOError, declaring that the handle is invalid. The error itself seems to be raised within RubyIO.java (line 2203), as shown in the logging output below:

Terminal started
term> Process #<Terminal:0x6a927603> encountered unhandled error: The handle is invalid (IOError)
   gets at org/jruby/RubyIO.java:2203
   read at /Users/petrilloj/Desktop/github/lagrange/lib/term.rb:48
  cycle at /Users/petrilloj/Desktop/github/lagrange/lib/term.rb:86
    run at /Users/petrilloj/Desktop/github/lagrange/lib/thread/process.rb:64
Terminal closed

Links to relevant code where this occurs can be found here:

For reference, the output from jruby -v produces (formatted for readability):

jruby 9.0.0.0.pre2 (2.2.2) 2015-04-28 2755ae0 Java HotSpot(TM) 
  64-Bit Server VM 25.31-b07 on 1.8.0_31-b13 +jit [Windows 7-amd64]

Note: this should be 1.8.0_45; I am away from my main development environment at the moment, but the problem persists on 1.8.0_31 as well.

@ghost
Copy link
Author

ghost commented May 28, 2015

Thanks! Glad to see the swift progress on this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant