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

#54 in #idiomatic

Download history 101/week @ 2024-07-20 195/week @ 2024-07-27 62/week @ 2024-08-03 31/week @ 2024-08-10 44/week @ 2024-08-17 20/week @ 2024-08-24 187/week @ 2024-08-31 138/week @ 2024-09-07 69/week @ 2024-09-14 153/week @ 2024-09-21 34/week @ 2024-09-28 6/week @ 2024-10-05 21/week @ 2024-10-12 55/week @ 2024-10-19 53/week @ 2024-10-26 23/week @ 2024-11-02

152 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