Crates.io | proc-ctl |
lib.rs | proc-ctl |
version | 0.4.0 |
source | src |
created_at | 2023-05-02 16:27:16.022357 |
updated_at | 2024-11-06 02:32:13.453048 |
description | A helper library for querying and manipulating processes |
homepage | |
repository | https://github.com/EphyraSoftware/proc-ctl |
max_upload_size | |
id | 854718 |
size | 83,091 |
A helper library for querying and manipulating processes.
use proc_ctl::PortQuery;
let query = PortQuery::new()
.tcp_only()
.ip_v4_only()
.process_id(55932) // Get a process ID from somewhere
.expect_min_num_ports(1);
query.execute().unwrap();
use proc_ctl::{ProcCtlResult, ProcQuery};
fn main() -> ProcCtlResult<()> {
let query = ProcQuery::new()
.process_name("firefox");
let processes = query.list_processes()?;
Ok(())
}
use proc_ctl::{ProcCtlResult, ProcQuery};
fn main() -> ProcCtlResult<()> {
let query = ProcQuery::new()
.process_id(55932) // Get a process ID from somewhere
.expect_min_num_children(1);
query.children()?;
Ok(())
}