process_alive

Crates.ioprocess_alive
lib.rsprocess_alive
version0.1.1
sourcesrc
created_at2022-11-10 18:09:30.64999
updated_at2022-11-10 18:24:22.402652
descriptionCross platform library to verify if a process is alive
homepage
repositoryhttps://github.com/caido/process_alive
max_upload_size
id712282
size7,811
Caido Bot (caidobot)

documentation

README

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);
}
Commit count: 10

cargo fmt