about summary refs log tree commit diff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2020-12-12 21:37:34 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2021-01-13 12:50:29 +0000
commit12d62aa436ee3a7ae0a55f63c4089c09fe140ccb (patch)
treeb5403d746851c50c8da55ce6252e4e719bca87e0
parent5b1316f78152a9c066b357ea9addf803d48e114a (diff)
downloadrust-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.rs2
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>;
 }