Enum watchexec::event::ProcessEnd
source · [−]pub enum ProcessEnd {
Success,
ExitError(NonZeroI64),
ExitSignal(SubSignal),
ExitStop(NonZeroI32),
Exception(NonZeroI32),
Continued,
}
Expand description
The end status of a process.
This is a sort-of equivalent of the std::process::ExitStatus
type, which is while
constructable, differs on various platforms. The native type is an integer that is interpreted
either through convention or via platform-dependent libc or kernel calls; our type is a more
structured representation for the purpose of being clearer and transportable.
On Unix, one can tell whether a process dumped core from the exit status; this is not replicated
in this structure; if that’s desirable you can obtain it manually via libc::WCOREDUMP
and the
ExitSignal
variant.
On Unix and Windows, the exit status is a 32-bit integer; on Fuchsia it’s a 64-bit integer. For
portability, we use i64
. On all platforms, the “success” value is zero, so we special-case
that as a variant and use NonZeroI*
to niche the other values.
Variants
Success
The process ended successfully, with exit status = 0.
ExitError(NonZeroI64)
The process exited with a non-zero exit status.
ExitSignal(SubSignal)
The process exited due to a signal.
ExitStop(NonZeroI32)
The process was stopped (but not terminated) (libc::WIFSTOPPED
).
Exception(NonZeroI32)
The process suffered an unhandled exception or warning (typically Windows only).
Continued
The process was continued (libc::WIFCONTINUED
).
Trait Implementations
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for ProcessEnd
impl Send for ProcessEnd
impl Sync for ProcessEnd
impl Unpin for ProcessEnd
impl UnwindSafe for ProcessEnd
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more