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

Open3.popen3 does not work in jruby 9.2.6 with openjdk 11.0.2 #5616

Closed
osammler opened this issue Feb 13, 2019 · 3 comments
Closed

Open3.popen3 does not work in jruby 9.2.6 with openjdk 11.0.2 #5616

osammler opened this issue Feb 13, 2019 · 3 comments
Milestone

Comments

@osammler
Copy link

@osammler osammler commented Feb 13, 2019

Environment

Linux  4.20.2-1-default #1 SMP PREEMPT Sun Jan 13 12:37:46 UTC 2019 (036c5c2) x86_64 x86_64 x86_64 GNU/Linux
jruby 9.2.6.0 (2.5.3) 2019-02-11 15ba00b OpenJDK 64-Bit Server VM 11.0.2+9 on 11.0.2+9 +jit [linux-x86_64]

Expected Behavior

  • Script:

test.txt

require 'open3'

def doit(command)
   stdout = nil
   Open3.popen3(command) do |i, o, e|
          stdout = o.read.chomp
   end
   puts("stdout: " + stdout)
end

doit("ls  /etc/hosts")

expected (with jdk1.8.0_121 it works correct):
variable stdout will get the stdout stream output

Output:
stdout: /etc/hosts

Actual Behavior

the output stream goes directly to screen and is not redirected with popen3

Output:
/etc/hosts
stdout:

@k77ch7
Copy link
Contributor

@k77ch7 k77ch7 commented Jun 10, 2019

@osammler maybe this works.

My Environment

jruby 9.2.8.0-SNAPSHOT (2.5.3) 2019-06-10 d2875a4 OpenJDK 64-Bit Server VM 11.0.2+9 on 11.0.2+9 +jit [darwin-x86_64]
@headius headius added this to the JRuby 9.2.8.0 milestone Jun 10, 2019
@headius
Copy link
Member

@headius headius commented Jun 10, 2019

Appears to be working properly in JRuby 9.2.8.0 on Java 11.

@headius headius closed this Jun 10, 2019
@osammler
Copy link
Author

@osammler osammler commented Jun 17, 2019

It works now with Jruby 9.2.8.0 on Java11.
Thanks for help.

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

Successfully merging a pull request may close this issue.

None yet
3 participants