pub fn pid_rusage<T: RusageFlavor>(pid: libc::pid_t) -> io::Result<T> {
    let mut rusage = mem::MaybeUninit::<T>::uninit();
    let result = unsafe {
        darwin_libproc_sys::proc_pid_rusage(
            pid,
            T::flavor() as i32,
            rusage.as_mut_ptr() as *mut _,
        )
    };

    if result < 0 {
        Err(io::Error::last_os_error())
    } else {
        Ok(unsafe { rusage.assume_init() })
    }
}
/// Return resource usage information for the given pid, which can be a live process or a zombie.
Return resource usage information for the given pid, which can be a live process or a zombie.
Return resource usage information for the given pid which can be a live process or a zombie .
pub fn pid_rusage<T: RusageFlavor>(pid: libc::pid_t) -> io::Result<T> {
    let mut rusage = mem::MaybeUninit::<T>::uninit();
    let result = unsafe {
        darwin_libproc_sys::proc_pid_rusage(
            pid,
            T::flavor() as i32,
            rusage.as_mut_ptr() as *mut _,
        )
    };
    if result < 0 {
        Err(io::Error::last_os_error())
    } else {
        Ok(unsafe { rusage.assume_init() })
    }
}
pub fn pid_rusage < T : RusageFlavor > ( pid : libc :: pid_t ) -> io :: Result < T > { let mut rusage = mem :: MaybeUninit :: < T > :: uninit ( ) ; let result = unsafe { darwin_libproc_sys :: proc_pid_rusage ( pid , T :: flavor ( ) as i32 , rusage . as_mut_ptr ( ) as * mut _ , ) } ; if result < 0 { Err ( io :: Error :: last_os_error ( ) ) } else { Ok ( unsafe { rusage . assume_init ( ) } ) } }
Return resource usage information for the given pid, which can be a live process or a zombie.
Return resource usage information for the given pid which can be a live process or a zombie .
pid
libc::pid_t