use std::process::Command;
use wait4::Wait4;
let cmd = Command::new(command);
// ...
let mut child = cmd.spawn().unwrap();
let r = child.wait4().unwrap();
- Unix-like using
libc::wait4
orlibc::getrusage
- Windows using
winapi::um::processthreadsapi::GetProcessTimes
andwinapi::um::psapi::GetProcessMemoryInfo
. - Proper documentation