Skip to main content

read_process_file_handles

Function read_process_file_handles 

Source
pub fn read_process_file_handles(pid: u32) -> Result<Vec<String>>
Expand description

Snapshot the file handles currently held by pid, returned as human-readable strings (filesystem paths where possible, socket:[...] / anon_inode:... style labels otherwise).

The list is best-effort and racy by nature — handles open and close between the enumeration call and the per-fd lookup. Any fd that disappears mid-walk is silently skipped rather than failing the whole snapshot.