From 4e7c348140b0ddc074c874f27399a3149a67e84d Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 17 May 2021 15:29:47 +0100 Subject: [PATCH] abort docs: Document buffer non-flushing There is discussion of this in #40230 which requests clarification. Signed-off-by: Ian Jackson --- library/std/src/process.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/std/src/process.rs b/library/std/src/process.rs index 95108f96e061..00027591a13b 100644 --- a/library/std/src/process.rs +++ b/library/std/src/process.rs @@ -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