Crates.io | process_alive |
lib.rs | process_alive |
version | 0.1.1 |
source | src |
created_at | 2022-11-10 18:09:30.64999 |
updated_at | 2022-11-10 18:24:22.402652 |
description | Cross platform library to verify if a process is alive |
homepage | |
repository | https://github.com/caido/process_alive |
max_upload_size | |
id | 712282 |
size | 7,811 |
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);
}