diff options
| author | bors <bors@rust-lang.org> | 2021-11-12 19:28:04 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-11-12 19:28:04 +0000 |
| commit | e90c5fbbc5df5c81267747daeb937d4e955ce6ad (patch) | |
| tree | 8d5dfc3ab54f45746b74fe9a33d9a86d6d7c526f /library/std/src | |
| parent | 220ed09b26177ca4b6ab525f403d251024389a41 (diff) | |
| parent | 5e7c0313976d670bbe6accdaa27347ed23aed58b (diff) | |
| download | rust-e90c5fbbc5df5c81267747daeb937d4e955ce6ad.tar.gz rust-e90c5fbbc5df5c81267747daeb937d4e955ce6ad.zip | |
Auto merge of #90836 - matthiaskrgr:rollup-ou6yrlw, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #90589 (rustc_llvm: update PassWrapper for recent LLVM) - #90644 (Extend the const swap feature) - #90704 (Unix ExitStatus comments and a tiny docs fix) - #90761 (Shorten Span of unused macro lints) - #90795 (Add more comments to explain the code to generate the search index) - #90798 (Document `unreachable!` custom panic message) - #90826 (rustc_feature: Convert `BuiltinAttribute` from tuple to a struct) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/os/unix/process.rs | 2 | ||||
| -rw-r--r-- | library/std/src/process.rs | 5 | ||||
| -rw-r--r-- | library/std/src/sys/unix/process/process_unix.rs | 3 |
3 files changed, 9 insertions, 1 deletions
diff --git a/library/std/src/os/unix/process.rs b/library/std/src/os/unix/process.rs index 01b8303a6c3..855f900430c 100644 --- a/library/std/src/os/unix/process.rs +++ b/library/std/src/os/unix/process.rs @@ -207,7 +207,7 @@ impl CommandExt for process::Command { /// [`ExitStatusError`](process::ExitStatusError). /// /// On Unix, `ExitStatus` **does not necessarily represent an exit status**, as -/// passed to the `exit` system call or returned by +/// passed to the `_exit` system call or returned by /// [`ExitStatus::code()`](crate::process::ExitStatus::code). It represents **any wait status** /// as returned by one of the `wait` family of system /// calls. diff --git a/library/std/src/process.rs b/library/std/src/process.rs index 9cc7fc2f035..b4dab41f066 100644 --- a/library/std/src/process.rs +++ b/library/std/src/process.rs @@ -1417,6 +1417,11 @@ impl From<fs::File> for Stdio { /// /// [`status`]: Command::status /// [`wait`]: Child::wait +// +// We speak slightly loosely (here and in various other places in the stdlib docs) about `exit` +// vs `_exit`. Naming of Unix system calls is not standardised across Unices, so terminology is a +// matter of convention and tradition. For clarity we usually speak of `exit`, even when we might +// mean an underlying system call such as `_exit`. #[derive(PartialEq, Eq, Clone, Copy, Debug)] #[stable(feature = "process", since = "1.0.0")] pub struct ExitStatus(imp::ExitStatus); diff --git a/library/std/src/sys/unix/process/process_unix.rs b/library/std/src/sys/unix/process/process_unix.rs index 326382d9038..3bf1493f3b8 100644 --- a/library/std/src/sys/unix/process/process_unix.rs +++ b/library/std/src/sys/unix/process/process_unix.rs @@ -617,6 +617,9 @@ impl Process { } /// Unix exit statuses +// +// This is not actually an "exit status" in Unix terminology. Rather, it is a "wait status". +// See the discussion in comments and doc comments for `std::process::ExitStatus`. #[derive(PartialEq, Eq, Clone, Copy)] pub struct ExitStatus(c_int); |
