INNER CODE UNIT · Rust
spawn_command
psmux/psmux · crates/portable-pty-psmux/src/lib.rs:187
fn spawn_command(&self, cmd: CommandBuilder) -> Result<Box<dyn Child + Send + Sync>, Error>;
}
/// Represents the exit status of a child process.
#[derive(Debug, Clone)]
pub struct ExitStatus {
code: u32,
signal: Option<String>,
}
impl ExitStatus {
/// Construct an ExitStatus from a process return code
pub fn with_exit_code(code: u32) -> Self {
Self { code, signal: None }
}
/// Construct an ExitStatus from a signal name
pub fn with_signal(signal: &str) -> Self {