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 work on Windows #3075

Closed
yamam opened this issue Jun 22, 2015 · 3 comments
Closed

popen3 doesn't work on Windows #3075

yamam opened this issue Jun 22, 2015 · 3 comments

Comments

@yamam
Copy link

yamam commented Jun 22, 2015

popen3 gets the following error on Windows.

$ jruby --version
jruby 9.0.0.0.rc1 (2.2.2) 2015-06-10 a0bf3b3 Java HotSpot(TM) Client VM 25.45-b02 on 1.8.0_45-b14 +jit [Windows 7-x86]

$jruby -r open3 -d -e 'Open3.popen3("notepad")'
io/console not supported; tty will not be manipulated
NotImplementedError: waitpid unsupported or native support failed to load

On jruby 1.7.x popen3 is implemented in RubyIO.java, and it works well.
Is there any way to use popen3 of RubyIO.java on jruby 9.0.0.0.rc1?

@headius
Copy link
Member

headius commented Jul 2, 2015

Ahh, we will need to restore some code to use the older RubyIO.popen3 for popen3 on Windows until we're able to do a better job implementing Kernel#spawn there. Marking for RC2 and I'll look into it.

@headius
Copy link
Member

headius commented Jul 7, 2015

I've committed the old open3.rb logic to work on Windows. This is not a perfect fix, but it should allow popen3 to work as well as it did in JRuby 1.7.x.

I'll file a separate issue to get full spawn support working on Windows.

@yamam
Copy link
Author

yamam commented Jul 8, 2015

Old open3.rb (open3_windows.rb) uses IO::popen3. But, RubyIO::popen3 is sitll marked as Deprecated.

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

2 participants