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

$stdout flushing issue #5806

Open
AlexEzzeddine opened this issue Jul 30, 2019 · 1 comment

Comments

@AlexEzzeddine
Copy link

commented Jul 30, 2019

Environment

JRuby version: 9.2.7.0
Platform: Ubuntu 14.04

Bug

When running this simple script (gist), nothing appears in the log file, but if you add $stdout.flush in the end of the script, then the log file will be populated.

Expected behavior: flush should happen before exiting the program

This issue started happening in jruby 9.0.0.0+
JRuby 1.7.27 flushes properly.

Also, related question... Why in JRuby 1.7.27 when you do $stdout.reopen, $stdout.sync stays true but in JRuby 9.0.0.0+ $stdout.sync becomes false?

@enebo

This comment has been minimized.

Copy link
Member

commented Jul 30, 2019

@AlexEzzeddine I cannot say what is wrong currently, but I can say that one major feature change of JRuby 9000 was the use of native IO by default (as opposed to doing things mostly through Java internal IO support). So noticing these differences may just from our change to native IO.

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