Debian Codegraph @

README.md

raw symbols SCIP
1 # Process Alive
2 [<img alt="github" src="https://img.shields.io/badge/github-caido/process_alive-8da0cb?style=for-the-badge&labelColor=555555&logo=github" height="20">](https://github.com/caido/process_alive)
3 [<img alt="crates.io" src="https://img.shields.io/crates/v/process_alive?color=fc8d62&logo=rust&style=for-the-badge" height="20">](https://crates.io/crates/process_alive)
4
5 This is a small cross platform crate to check if a process is alive.
6 Inspired by [sysinfo](https://github.com/GuillaumeGomez/sysinfo), but without the need to parse through all the processes to verify one.
7 Since there can be some errors related to permissions, the state can be `Unknown` and you can decide how you want to handle it.
8
9 ```rust
10 use process_alive::{State, Pid};
11
12 pub fn main() {
13 let pid = Pid::from(1234);
14 let state = process_alive::state(pid);
15 println("Process {} is {}", pid, state);
16 }
17 ```