Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcf300a7

Browse files
zachs18RalfJung
andauthored
Update library/std/src/sys/pal/common/exit_guard.rs
Co-authored-by: Ralf Jung <post@ralfj.de>
1 parent079f999 commitcf300a7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎std/src/sys/pal/common/exit_guard.rs‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff 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`.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp