Macro cmd_lib::spawn[][src]

spawn!() { /* proc-macro */ }
Expand description

Run commands with/without pipes as a child process, returning a handle to check the final result


let handle = spawn!(ping -c 10 192.168.0.1)?;
// ...
if handle.wait_cmd_result().is_err() {
    // ...
}