2 releases
0.1.1 | Nov 10, 2022 |
---|---|
0.1.0 | Nov 10, 2022 |
#1 in #alive
1,346 downloads per month
Used in 5 crates
(3 directly)
7KB
152 lines
Process Alive
This is a small cross platform crate to check if a process is alive.
Inspired by sysinfo, but without the need to parse through all the processes to verify one.
Since there can be some errors related to permissions, the state can be Unknown
and you can decide how you want to handle it.
use process_alive::{State, Pid};
pub fn main() {
let pid = Pid::from(1234);
let state = process_alive::state(pid);
println("Process {} is {}", pid, state);
}
Dependencies
~185KB