pub struct ExitStatusWrapper(/* private fields */);
Expand description
Wraps std::process::ExitStatus
. Historically, this was due to the
wait_timeout
crate having its own ExitStatus
type.
Method documentation is copied from the Rust std
docs
and the wait_timeout
docs.
Implementations§
Source§impl ExitStatusWrapper
impl ExitStatusWrapper
Sourcepub fn success(&self) -> bool
pub fn success(&self) -> bool
Was termination successful? Signal termination is not considered a success, and success is defined as a zero exit status.
Sourcepub fn code(&self) -> Option<i32>
pub fn code(&self) -> Option<i32>
Returns the exit code of the process, if any.
On Unix, this will return None
if the process was terminated by a
signal; std::os::unix
provides an extension trait for extracting the
signal and other details from the ExitStatus
.
Sourcepub fn unix_signal(&self) -> Option<i32>
pub fn unix_signal(&self) -> Option<i32>
Returns the Unix signal which terminated this process.
Note that on Windows this will always return None and on Unix this will return None if the process successfully exited otherwise.
For simplicity and to match wait_timeout
, this method is always
present even on systems that do not support it.
Trait Implementations§
Source§impl Clone for ExitStatusWrapper
impl Clone for ExitStatusWrapper
Source§fn clone(&self) -> ExitStatusWrapper
fn clone(&self) -> ExitStatusWrapper
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more