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

FreeBSD TestPTY#test_commandline fails #2793

Closed
bgalbrecht opened this issue Apr 2, 2015 · 4 comments
Closed

FreeBSD TestPTY#test_commandline fails #2793

bgalbrecht opened this issue Apr 2, 2015 · 4 comments

Comments

@bgalbrecht
Copy link

On FreeBSD 10.1 release, after building jruby 9.0.0.0, running
bin/jruby -S rake test:mri
I get the following error:
[4359/6445] TestPTY#test_commandline = 0.00 s
2) Error:
TestPTY#test_commandline:
NoMethodError: private method spawn' called for PTY:Module /usr/home/bruce/jruby-dev/jruby/test/mri/test_pty.rb:42:intest_commandline'

@bgalbrecht
Copy link
Author

bin/jruby -v
jruby 9.0.0.0-SNAPSHOT (2.2.1) 2015-04-01 dc85f30 OpenJDK 64-Bit Server VM 24.76-b04 on 1.7.0_76-b13 +jit [FreeBSD-amd64]

@bgalbrecht
Copy link
Author

I can't tell about openbsd, but netbsd, freebsd, and dragonflybsd all have forkpty in libutil. The libutil check in lib/ruby/stdlib/pty.rb is wrong. When I changed the logic to
if FFI::Platform.linux? || (FFI::Platform.bsd? && ! not FFI::Platform.mac?)
it worked on FreeBSD, but I have no access to a mac to validate for it.

@bgalbrecht bgalbrecht changed the title jruby 9000 FreeBSD TestPTY#test_commandline fails FreeBSD TestPTY#test_commandline fails Apr 2, 2015
@bgalbrecht
Copy link
Author

In looking at the 1.7.x branches, I see the code is wrong there also.

@headius
Copy link
Member

headius commented Apr 2, 2015

The fix looks good. I will apply it to both 1.7 and master. Thank you!

headius added a commit that referenced this issue Apr 2, 2015
@headius headius closed this as completed in 8933467 Apr 2, 2015
@headius headius added this to the JRuby 1.7.20 milestone Apr 2, 2015
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