#cross-platform #process #alive #verify #system-info #state #pid

process_alive

Cross platform library to verify if a process is alive

2 releases

0.1.1 Nov 10, 2022
0.1.0 Nov 10, 2022

#1 in #alive

Download history 485/week @ 2024-07-20 325/week @ 2024-07-27 254/week @ 2024-08-03 222/week @ 2024-08-10 218/week @ 2024-08-17 220/week @ 2024-08-24 425/week @ 2024-08-31 261/week @ 2024-09-07 546/week @ 2024-09-14 381/week @ 2024-09-21 137/week @ 2024-09-28 406/week @ 2024-10-05 364/week @ 2024-10-12 354/week @ 2024-10-19 400/week @ 2024-10-26 215/week @ 2024-11-02

1,346 downloads per month
Used in 5 crates (3 directly)

MIT license

7KB
152 lines

Process Alive

github crates.io

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