Skip to main content

proc_uid

Function proc_uid 

Source
pub fn proc_uid(pid: i32) -> Result<u32, CoreError>
Expand description

Return the owning UID for /proc/<pid>.

This is a cheap ownership probe that can be useful before reading procfs files such as /proc/<pid>/cmdline in hot paths. Processes may disappear at any time, so callers should treat ENOENT as a normal race.