Skip to content

Commit

Permalink
abort docs: Document buffer non-flushing
Browse files Browse the repository at this point in the history
There is discussion of this in rust-lang#40230 which requests clarification.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
  • Loading branch information
ijackson authored and m-ou-se committed Jul 5, 2021
1 parent de19e4d commit 4e7c348
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library/std/src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1898,6 +1898,9 @@ pub fn exit(code: i32) -> ! {
/// process, no destructors on the current stack or any other thread's stack
/// will be run.
///
/// Rust IO buffers (eg, from `BufWriter`) will not be flushed.
/// Likewise, C stdio buffers will (on most platforms) not be flushed.
///
/// This is in contrast to the default behaviour of [`panic!`] which unwinds
/// the current thread's stack and calls all destructors.
/// When `panic="abort"` is set, either as an argument to `rustc` or in a
Expand Down

0 comments on commit 4e7c348

Please sign in to comment.