psutil 5.4.0

Process and system monitoring library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::process::processes;
use crate::{Pid, Result};

pub fn pids() -> Result<Vec<Pid>> {
	Ok(processes()?
		.into_iter()
		.filter_map(|process| process.ok())
		.map(|process| process.pid())
		.collect())
}

pub fn pid_exists(_pid: Pid) -> bool {
	todo!()
}