#macos #process #proc #process-information #file-descriptor #syscalls #pidinfo

proc_pidinfo

A library for accessing process information using proc_pidinfo on macOS

3 releases

new 0.1.2 Jan 16, 2025
0.1.1 Jan 16, 2025
0.1.0 Jan 14, 2025

#44 in macOS and iOS APIs

Download history 60/week @ 2025-01-09

60 downloads per month

MIT/Apache

26KB
564 lines

proc_pidinfo

A Rust library for accessing the proc_pidinfo, proc_pidfdinfo, and proc_pidfileportinfo system calls safely on macOS.

Usage

Add this to your Cargo.toml:

[dependencies]
proc_pidinfo = "0.1"

Then, you can use the proc_* functions to get information about a process (including task info, file descriptors, etc).

use proc_pidinfo::*;

for fd in proc_pidinfo_list_self::<ProcFDInfo>().unwrap() {
    println!("{:?}", fd);
}

Dependencies