pub struct ExitStatus(/* private fields */);Expand description
The exit status of a child process that has terminated.
Obtained from either front end’s Child::wait or Child::try_wait. The
wrapped value is exactly what GetExitCodeProcess reported, read only
after the process handle was confirmed signaled — so it can never be the
STILL_ACTIVE sentinel of a still-running process.
§Examples
use conpty_oxide::ExitStatus;
if status.success() {
println!("clean exit");
} else {
println!("failed with {}", status.code());
}Implementations§
Trait Implementations§
Source§impl Clone for ExitStatus
impl Clone for ExitStatus
Source§fn clone(&self) -> ExitStatus
fn clone(&self) -> ExitStatus
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ExitStatus
Source§impl Debug for ExitStatus
impl Debug for ExitStatus
Source§impl Display for ExitStatus
Formats as exit code: <code>, matching std::process::ExitStatus on
Windows: decimal for ordinary codes, hexadecimal when the high bit is set.
impl Display for ExitStatus
Formats as exit code: <code>, matching std::process::ExitStatus on
Windows: decimal for ordinary codes, hexadecimal when the high bit is set.
The hexadecimal case matters more here than it would elsewhere, because
the code this crate documents most — STATUS_CONTROL_C_EXIT, reported by
a child whose terminal went away — is in that range: it renders as
exit code: 0xc000013a, the spelling NTSTATUS values are written in
everywhere, rather than the unrecognizable 3221225786.