vfork 0.1.0

vfork-rs is used in embedded low memory to run an external program.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use vfork::Command;

fn main() {
    let mut cmd = Command::new("/bin/echo")
        .arg("Hello, world!")
        .spawn()
        .expect("failed to execute process");

    let status_code = cmd.wait().expect("failed to wait process");
    println!("status code: {}", status_code.code());

    let output = cmd.output().expect("failed to get output");
    println!("output: {:?}", String::from_utf8_lossy(&output));
}