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

#48 in #idiomatic

Download history 14/week @ 2024-11-15 49/week @ 2024-11-22 48/week @ 2024-11-29 99/week @ 2024-12-06 50/week @ 2024-12-13 16/week @ 2024-12-20 8/week @ 2024-12-27 30/week @ 2025-01-03 11/week @ 2025-01-10 13/week @ 2025-01-17 7/week @ 2025-01-24 14/week @ 2025-01-31 43/week @ 2025-02-07 53/week @ 2025-02-14 27/week @ 2025-02-21 15/week @ 2025-02-28

141 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