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

#42 in #idiomatic

Download history 47/week @ 2024-04-08 47/week @ 2024-04-15 99/week @ 2024-04-22 159/week @ 2024-04-29 50/week @ 2024-05-06 336/week @ 2024-05-13 79/week @ 2024-05-20 152/week @ 2024-05-27 93/week @ 2024-06-03 160/week @ 2024-06-10 144/week @ 2024-06-17 71/week @ 2024-06-24 156/week @ 2024-07-01 204/week @ 2024-07-08 89/week @ 2024-07-15 91/week @ 2024-07-22

546 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