Function pid_path
Source pub fn pid_path(pid: pid_t) -> Result<PathBuf>
Expand description
Fetch executable absolute path for process with pid
provided.
6fn main() -> io::Result<()> {
7 let pids = darwin_libproc::all_pids()?;
8 for pid in pids {
9 println!("PID: #{}", pid);
10 println!("\tName: {:?}", darwin_libproc::name(pid)?);
11 println!("\tPath: {:?}", darwin_libproc::pid_path(pid)?);
12 }
13
14 Ok(())
15}