You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run test.rb under Ruby >= 2.3 I get results similar to this.
stdout is #IO:0x00000002da0668
stderr is #IO:0x00000002da05c8
No IO Available - select timeout worked
No IO Available - select timeout worked
No IO Available - select timeout worked
Read 100 from stream #IO:0x00000002da0668
Read 100 from stream #IO:0x00000002da0668
Read 100 from stream #IO:0x00000002da0668
Read 100 from stream #IO:0x00000002da0668
Read 100 from stream #IO:0x00000002da0668
Read 100 from stream #IO:0x00000002da0668
Read 100 from stream #IO:0x00000002da0668
Read 100 from stream #IO:0x00000002da0668
Read 100 from stream #IO:0x00000002da0668
Read 100 from stream #IO:0x00000002da0668
No IO Available - select timeout worked
No IO Available - select timeout worked
Read 4 from stream #IO:0x00000002da0668
Read 54 from stream #IO:0x00000002da05c8
No IO Available - select timeout worked
EAGAINWaitReadable exceptions 0
EOFError exceptions 2
total duration 7.243
avg IO.Select time 0.4003888888888889
Actual Behavior
When I run the script under the JRuby versions listed at the top I get results similar to this.
stdout is #IO:0x553a3d88
stderr is #IO:0x5891e32e
EAGAINWaitReadable exceptions 912342
EOFError exceptions 0
total duration 12.085
avg IO.Select time 4.6999918890062625e-06
It seems that select is not working (avg select function time is 0.00000469 seconds). When read_nonblock is called it raises EAGAINWaitReadable every time it is called. It is then impossible to read from the stdout after that.
The text was updated successfully, but these errors were encountered:
Windows! Yes, this is expected behavior mostly due to two things:
Java's process API does not produce selectable streams
Our native process API has not been ported to Windows yet
There are other issues about this and it will be fixed soon, but resources are tight. It may be possible to improve things for the script you've provided without going all the way to getting native processes working.
Environment
Ruby 2.3.3, 2.4.1, 2.5.0 for expected results
JRuby 9.0.5, 9.1.7, 9.1.16 for actual results
Windows 7 64 bit
java -version output
Other relevant info you may wish to add:
Expected Behavior
The attached archive contains a script called test.rb.
child_process_io_select_demo.zip
When I run test.rb under Ruby >= 2.3 I get results similar to this.
Actual Behavior
When I run the script under the JRuby versions listed at the top I get results similar to this.
It seems that select is not working (avg select function time is 0.00000469 seconds). When read_nonblock is called it raises EAGAINWaitReadable every time it is called. It is then impossible to read from the stdout after that.
The text was updated successfully, but these errors were encountered: