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

Open
osammler opened this Issue Feb 13, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@osammler
Copy link

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.