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 in JRuby 1.7 behaves differently than JRuby 9 and MRI #3580

Closed
chingc opened this issue Jan 5, 2016 · 2 comments
Closed

Open3.popen3 in JRuby 1.7 behaves differently than JRuby 9 and MRI #3580

chingc opened this issue Jan 5, 2016 · 2 comments
Milestone

Comments

@chingc
Copy link

chingc commented Jan 5, 2016

I'm having the following issue in the JRuby 1.7.23 in which the code snippet below will display hello world with the system call, but $hi when using popen3. In JRuby 9.0.4.0 and MRI Ruby, both calls display hello world as expected.

I'd love to update to the 9 series, but my current development environment requires 1.7 and updating is unlikely to happen swiftly.

require "open3"

system( { "hi" => "hello world" }, "echo $hi" )

Open3.popen3( { "hi" => "hello world" }, "echo $hi" ) do | i, o, e |
    puts o.read
end
@headius
Copy link
Member

headius commented Jan 5, 2016

Unfortunately the popen3 in JRuby 9 works like MRI because a tremendous amount of work went into making subprocess logic do the right thing. The logic in 1.7 is built entirely atop the JDK's process APIs, which are severely lacking.

This might not be an easy item to fix, I'm afraid.

@kares kares added this to the Won't Fix milestone Jan 6, 2016
@chingc
Copy link
Author

chingc commented Jan 6, 2016

Ahh, sounds like I'll have to find some other way to resolve my issue. Thanks for the info @headius.

@chingc chingc closed this as completed Jan 6, 2016
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

3 participants