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

popen3 doesn't works fine with java 9/10 and jruby > 1.9.13 #5235

Closed
areman opened this issue Jun 30, 2018 · 7 comments
Closed

popen3 doesn't works fine with java 9/10 and jruby > 1.9.13 #5235

areman opened this issue Jun 30, 2018 · 7 comments
Milestone

Comments

@areman
Copy link
Contributor

areman commented Jun 30, 2018

The stdout, stderr is not captured with java 9 and 10.

I'm running this simple test on Ubuntu 16.04 and SLES with the same result

require 'open3'

Open3.popen3('echo 123') do |_stdin, stdout, _stderr|
  out = stdout.read.strip
  fail "exprected '123' but got '#{out}'" unless out == '123'
end

With Java 10.0.1 and 9.1.13 it works fine.
Starting from jruby 9.1.14 the test fails.
Switching to Java 1.8.0_144 the test works again with jruby version greater than 9.1.13.

@headius
Copy link
Member

headius commented Aug 16, 2018

Works properly on MacOS with JRuby 9.2.1. I'll confirm it works on Linux too.

@headius
Copy link
Member

headius commented Aug 16, 2018

This appears to be working with JRuby 9.1.17 and 9.2 on both MacOS and Linux.

@headius headius closed this as completed Aug 16, 2018
@headius headius added this to the JRuby 9.1.17.0 milestone Aug 16, 2018
@headius headius reopened this Aug 16, 2018
@headius
Copy link
Member

headius commented Aug 16, 2018

Oops, I just realized this was reported against Java 9/10. Reopening.

@headius headius modified the milestones: JRuby 9.1.17.0, JRuby 9.2.1.0 Aug 16, 2018
@lberoiza
Copy link

Thank you all for your answers.

But the problem is that popen3 doesn't works fine with java 9/10 and jruby 1.9.13

@headius
Copy link
Member

headius commented Oct 11, 2018

Relates to #4835 which will continue work in 9.2.2.

@headius
Copy link
Member

headius commented Aug 7, 2019

This seems to work fine for me on Java 11 on MacOS:

require 'open3'

Open3.popen3('echo 123') do |_stdin, stdout, _stderr|
  out = stdout.read.strip
  p out
end
$ jruby -v x.rb
jruby 9.2.8.0-SNAPSHOT (2.5.3) 2019-08-06 4d4d303 OpenJDK 64-Bit Server VM 11.0.2+9 on 11.0.2+9 +jit [darwin-x86_64]
"123"

@JonRowe
Copy link

JonRowe commented Nov 21, 2020

This is happening on "JRuby 9.1.17.0" for "ubuntu 20.04" on Github actions, it might be the default Java for that release is broken? https://github.com/rspec/rspec-support/runs/1435614749?check_suite_focus=true

edit indeed using 18.04 fixes this issue, for other people googling

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

No branches or pull requests

5 participants