pub enum WaitStatus {
Exited(pid_t, c_int),
Signaled(pid_t, Signal, bool),
Stopped(pid_t, Signal),
Continued(pid_t),
}
Expand description
A WaitStatus
is the result of wait()
ing for a child process
Variants§
Exited(pid_t, c_int)
Process exited normally with the given return code
Signaled(pid_t, Signal, bool)
Process was signaled by Signal
. If a core dump was produced,
the third field is true
.
Stopped(pid_t, Signal)
Process is still alive, but was stopped by Signal
Continued(pid_t)
Process was stopped but has resumed execution after receiving a
SIGCONT
signal
Implementations§
Source§impl WaitStatus
impl WaitStatus
Sourcepub fn from_raw(pid: pid_t, status: c_int) -> Result<WaitStatus>
pub fn from_raw(pid: pid_t, status: c_int) -> Result<WaitStatus>
Convert a raw status
as returned by libc::waitpid()
into a WaitStatus
This function is using the standard set of wait status related macros in
order to dissect status
Trait Implementations§
Source§impl Clone for WaitStatus
impl Clone for WaitStatus
Source§fn clone(&self) -> WaitStatus
fn clone(&self) -> WaitStatus
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for WaitStatus
impl Debug for WaitStatus
Source§impl PartialEq for WaitStatus
impl PartialEq for WaitStatus
impl Copy for WaitStatus
impl Eq for WaitStatus
impl StructuralPartialEq for WaitStatus
Auto Trait Implementations§
impl Freeze for WaitStatus
impl RefUnwindSafe for WaitStatus
impl Send for WaitStatus
impl Sync for WaitStatus
impl Unpin for WaitStatus
impl UnwindSafe for WaitStatus
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more