4 releases

0.1.3 Sep 2, 2021
0.1.2 Aug 22, 2021
0.1.1 Apr 12, 2021
0.1.0 Apr 12, 2021

#47 in #idiomatic

Download history 12/week @ 2023-12-14 6/week @ 2024-01-11 8/week @ 2024-01-18 7/week @ 2024-02-01 14/week @ 2024-02-08 18/week @ 2024-02-15 19/week @ 2024-02-22 15/week @ 2024-02-29 34/week @ 2024-03-07 29/week @ 2024-03-14 17/week @ 2024-03-21 21/week @ 2024-03-28

101 downloads per month
Used in 2 crates

MIT license

12KB
170 lines

Rust idiomatic binding to wait4

crates.io docs.rs

use std::process::Command;
use wait4::Wait4;

let cmd = Command::new(command);

// ...
let mut child = cmd.spawn().unwrap();

let r = child.wait4().unwrap();

Status

  • Unix-like using libc::wait4 or libc::getrusage
  • Windows using winapi::um::processthreadsapi::GetProcessTimes and winapi::um::psapi::GetProcessMemoryInfo.
  • Proper documentation

License

MIT, the windows code is partially from hyperfine.

Dependencies

~220KB