diff options
| author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2021-11-08 17:38:53 +0000 |
|---|---|---|
| committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2021-11-11 17:48:51 +0000 |
| commit | fe39fb314973f16dcb73b1f6ed8395aaf29299ec (patch) | |
| tree | 711fdc0fe598a2cf17b08b15341e42cd6cfff98f | |
| parent | d1df4715ec851f7e8b019b4ed0fca14bac1dacc9 (diff) | |
| download | rust-fe39fb314973f16dcb73b1f6ed8395aaf29299ec.tar.gz rust-fe39fb314973f16dcb73b1f6ed8395aaf29299ec.zip | |
process::ExitStatus: Discuss `exit` vs `_exit` in a comment.
As discussed here https://github.com/rust-lang/rust/pull/88300#issuecomment-936097710 I felt this was the best place to put this (rather than next to ExitStatusExt). After all, it's a property of the ExitStatus type on Unix. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
| -rw-r--r-- | library/std/src/process.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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); |
