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>
This commit is contained in:
Ian Jackson 2020-12-12 21:37:34 +00:00
parent 5b1316f781
commit 12d62aa436

View File

@ -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>;
}