Function name

Source
pub fn name(pid: pid_t) -> Result<OsString>
Expand description

Fetch process name for pid provided.

Examples found in repository?
examples/processes.rs (line 10)
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}