-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Don't panic when stdout doesn't exist #25977
Comments
See also #14505: compiler crashes on lost stdout (will probably be fixed when this is fixed) |
Closes rust-lang#25977 The various `stdfoo_raw` methods in std::io now return `io::Result`s, since they may not exist on Windows. They will always return `Ok` on Unix-like platforms. [breaking-change]
Closes #25977 The various `stdfoo_raw` methods in std::io now return `io::Result`s, since they may not exist on Windows. They will always return `Ok` on Unix-like platforms. [breaking-change]
It seems that, while closing the stdout descriptor and calling print!() won't panic anymore, writing to a broken pipe still panics:
It is not clear from the RFC (1014-stdout-existential-crisis.md) whether this was intended, but it might warrant clarification. |
There was a little discussion on the RFC (in the collapsed comments), but it may not have made its way into the text. |
It seems that the behavior of stdout() (and even panic!()) was discussed at length but not print!(). It seems weird to have print!() work fine in daemons or after closing stdout, but not when the pipe gets closed... (looking into it, |
Tracking issue for rust-lang/rfcs#1014
The text was updated successfully, but these errors were encountered: