diff options
| author | bors <bors@rust-lang.org> | 2024-08-27 20:57:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-08-27 20:57:15 +0000 |
| commit | 1f12b9b0fdbe735968ac002792a720f0ba4faca6 (patch) | |
| tree | 7f6068cbd36311d85e223378ef65d4b7452659c4 /library/std | |
| parent | ab869e094a907cc5d19b4080f22eccaf347f1f95 (diff) | |
| parent | ac0cc709c3840c0617498950d26d12b3d4a4c1f3 (diff) | |
| download | rust-1f12b9b0fdbe735968ac002792a720f0ba4faca6.tar.gz rust-1f12b9b0fdbe735968ac002792a720f0ba4faca6.zip | |
Auto merge of #129665 - matthiaskrgr:rollup-hy23k7d, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #129507 (make it possible to enable const_precise_live_drops per-function) - #129581 (exit: explain our expectations for the exit handlers registered in a Rust program) - #129634 (Fix tidy to allow `edition = "2024"` in `Cargo.toml`) - #129635 (Use unsafe extern blocks throughout the compiler) - #129645 (Fix typos in floating-point primitive type docs) - #129648 (More `unreachable_pub`) - #129649 (ABI compat check: detect unadjusted ABI mismatches) - #129652 (fix Pointer to reference conversion docs) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std')
| -rw-r--r-- | library/std/src/process.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/library/std/src/process.rs b/library/std/src/process.rs index 9ffdebe1b6f..bbea27ebc10 100644 --- a/library/std/src/process.rs +++ b/library/std/src/process.rs @@ -2296,6 +2296,15 @@ impl Child { /// } /// ``` /// +/// In its current implementation, this function will execute exit handlers registered with `atexit` +/// as well as other platform-specific exit handlers (e.g. `fini` sections of ELF shared objects). +/// This means that Rust requires that all exit handlers are safe to execute at any time. In +/// particular, if an exit handler cleans up some state that might be concurrently accessed by other +/// threads, it is required that the exit handler performs suitable synchronization with those +/// threads. (The alternative to this requirement would be to not run exit handlers at all, which is +/// considered undesirable. Note that returning from `main` also calls `exit`, so making `exit` an +/// unsafe operation is not an option.) +/// /// ## Platform-specific behavior /// /// **Unix**: On Unix-like platforms, it is unlikely that all 32 bits of `exit` |
