diff options
| author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2020-12-12 21:37:34 +0000 |
|---|---|---|
| committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2021-01-13 12:50:29 +0000 |
| commit | 12d62aa436ee3a7ae0a55f63c4089c09fe140ccb (patch) | |
| tree | b5403d746851c50c8da55ce6252e4e719bca87e0 | |
| parent | 5b1316f78152a9c066b357ea9addf803d48e114a (diff) | |
| download | rust-12d62aa436ee3a7ae0a55f63c4089c09fe140ccb.tar.gz rust-12d62aa436ee3a7ae0a55f63c4089c09fe140ccb.zip | |
unix ExitStatus: Clarify docs for .signal()
We need to be clear that this never returns WSTOPSIG. That is, if WIFSTOPPED, the return value is None. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
| -rw-r--r-- | library/std/src/sys/unix/ext/process.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/sys/unix/ext/process.rs b/library/std/src/sys/unix/ext/process.rs index 3615a8a5ee8..ab961a284d5 100644 --- a/library/std/src/sys/unix/ext/process.rs +++ b/library/std/src/sys/unix/ext/process.rs @@ -171,6 +171,8 @@ pub trait ExitStatusExt { fn from_raw(raw: i32) -> Self; /// If the process was terminated by a signal, returns that signal. + /// + /// Ie, if `WIFSIGNALED`, this returns `WTERMSIG`. #[stable(feature = "rust1", since = "1.0.0")] fn signal(&self) -> Option<i32>; } |
