https://github.com/lu-zero/wait4-rs
Rust idiomatic wrapper around wait4
https://github.com/lu-zero/wait4-rs
Last synced: 3 months ago
JSON representation
Rust idiomatic wrapper around wait4
- Host: GitHub
- URL: https://github.com/lu-zero/wait4-rs
- Owner: lu-zero
- License: mit
- Created: 2021-04-12T17:26:25.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-09-06T13:15:49.000Z (over 4 years ago)
- Last Synced: 2024-10-14T08:53:09.123Z (about 1 year ago)
- Language: Rust
- Size: 11.7 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rust idiomatic binding to wait4
[](https://crates.io/crates/wait4)
[](https://docs.rs/wait4)
``` rust
use std::process::Command;
use wait4::Wait4;
let cmd = Command::new(command);
// ...
let mut child = cmd.spawn().unwrap();
let r = child.wait4().unwrap();
```
## Status
- [x] Unix-like using `libc::wait4` or `libc::getrusage`
- [x] Windows using `winapi::um::processthreadsapi::GetProcessTimes` and `winapi::um::psapi::GetProcessMemoryInfo`.
- [x] Proper documentation
## License
[MIT](https://spdx.org/licenses/MIT), the windows code is partially from [hyperfine](https://github.com/sharkdp/hyperfine).