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

#43 in #idiomatic

Download history 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 12/week @ 2024-03-21 21/week @ 2024-03-28 47/week @ 2024-04-04 29/week @ 2024-04-11 104/week @ 2024-04-18 128/week @ 2024-04-25 86/week @ 2024-05-02 167/week @ 2024-05-09 232/week @ 2024-05-16

620 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