mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
Rollup merge of #90704 - ijackson:exitstatus-comments, r=joshtriplett
Unix ExitStatus comments and a tiny docs fix Some nits left over from #88300
This commit is contained in:
commit
160602b485
@ -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.
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user