Skip to content

New IO stdout is not flushed at program exit #23191

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

Closed
shepmaster opened this issue Mar 8, 2015 · 1 comment
Closed

New IO stdout is not flushed at program exit #23191

shepmaster opened this issue Mar 8, 2015 · 1 comment

Comments

@shepmaster
Copy link
Member

I know that the new IO is being worked on, but I could see this being a sneaky thing that gets lost.

#![feature(io)]
use std::io::Write;
fn main() {
    write!(&mut std::io::stdout(), "Hello world").unwrap();
}

This code prints nothing. If we use stderr instead, there is output.

rustc 1.0.0-nightly (270a677d4 2015-03-07) (built 2015-03-07)

@alexcrichton
Copy link
Member

Unfortunately this is a duplicate of #20012. The buffers would all be properly flushed if we actually ran the at_exit callbacks. I'll try to prioritize fixing that this coming week!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants