Skip to content

Commit 4e7c348

Browse files
ijacksonm-ou-se
authored andcommitted
abort docs: Document buffer non-flushing
There is discussion of this in #40230 which requests clarification. Signed-off-by: Ian Jackson <[email protected]>
1 parent de19e4d commit 4e7c348

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

library/std/src/process.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1898,6 +1898,9 @@ pub fn exit(code: i32) -> ! {
18981898
/// process, no destructors on the current stack or any other thread's stack
18991899
/// will be run.
19001900
///
1901+
/// Rust IO buffers (eg, from `BufWriter`) will not be flushed.
1902+
/// Likewise, C stdio buffers will (on most platforms) not be flushed.
1903+
///
19011904
/// This is in contrast to the default behaviour of [`panic!`] which unwinds
19021905
/// the current thread's stack and calls all destructors.
19031906
/// When `panic="abort"` is set, either as an argument to `rustc` or in a

0 commit comments

Comments
 (0)