File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,14 @@ cfg_if::cfg_if! {
22 if #[ cfg( target_os = "linux" ) ] {
33 /// Mitigation for <https://github.com/rust-lang/rust/issues/126600>
44 ///
5- /// On UNIX-like platforms (where `libc::exit` may not be thread-safe), ensure that only one
5+ /// On glibc, `libc::exit` has been observed to not always be thread-safe.
6+ /// It is currently unclear whether that is a glibc bug or allowed by the standard.
7+ /// To mitigate this problem, we ensure that only one
68 /// Rust thread calls `libc::exit` (or returns from `main`) by calling this function before
79 /// calling `libc::exit` (or returning from `main`).
810 ///
9- /// Technically not enough to ensure soundness, since other code directly calling
10- /// libc::exit will still race with this.
11+ /// Technically, this is not enough to ensure soundness, since other code directly calling
12+ /// ` libc::exit` will still race with this.
1113 ///
1214 /// *This function does not itself call `libc::exit`.* This is so it can also be used
1315 /// to guard returning from `main`.
You can’t perform that action at this time.
0 commit comments