From 12d62aa436ee3a7ae0a55f63c4089c09fe140ccb Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 12 Dec 2020 21:37:34 +0000 Subject: [PATCH] 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 --- library/std/src/sys/unix/ext/process.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/std/src/sys/unix/ext/process.rs b/library/std/src/sys/unix/ext/process.rs index 3615a8a5ee8b..ab961a284d51 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; }