You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
412 B
Rust

use std::process::{Command, Stdio};
fn main() {
let _child_process = match Command::new("invalid-command")
.stdin(Stdio::piped())
.stdout(Stdio::piped())
.spawn()
{
Err(err) => panic!("Unable to spawn child process: {}", err),
Ok(new_process_handle) => {
println!("Successfully spawned child process");
new_process_handle
}
};
}