Skip to content

Commit 12d62aa

Browse files
committed
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>
1 parent 5b1316f commit 12d62aa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/std/src/sys/unix/ext/process.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ pub trait ExitStatusExt {
171171
fn from_raw(raw: i32) -> Self;
172172

173173
/// If the process was terminated by a signal, returns that signal.
174+
///
175+
/// Ie, if `WIFSIGNALED`, this returns `WTERMSIG`.
174176
#[stable(feature = "rust1", since = "1.0.0")]
175177
fn signal(&self) -> Option<i32>;
176178
}

0 commit comments

Comments
 (0)