Type Alias ProcessHandle

Source
pub type ProcessHandle = (Pid, Architecture);
Expand description

A ProcessHandle is a variable type that allows for access to functions that can manipulate other processes. On platforms other than Linux, this is typically a different type than Pid, and thus it is a distinct type here.

On Linux a ProcessHandle is just a libc::pid_t.

Trait Implementations§

Source§

impl CopyAddress for ProcessHandle

Source§

fn get_pointer_width(&self) -> Architecture

Get the the pointer width of the underlying process. This is required for get_offset to work. Read more
Source§

fn copy_address(&self, addr: usize, buf: &mut [u8]) -> Result<()>

Copy an address into user-defined buffer. Read more
Source§

fn get_offset(&self, offsets: &[usize]) -> Result<usize>

Get the actual memory location from a set of offsets. Read more
Source§

impl ProcessHandleExt for ProcessHandle

Source§

fn check_handle(&self) -> bool

Returns true if the ProcessHandle is not null, and false otherwise.
Source§

fn null_type() -> Self

Return the null equivalent of a ProcessHandle.
Source§

fn set_arch(self, arch: Architecture) -> Self

Set this handle to use some architecture
Source§

impl PutAddress for ProcessHandle

Source§

fn put_address(&self, addr: usize, buf: &[u8]) -> Result<()>

Put the data from a user-defined buffer at an address. Read more
Source§

impl TryIntoProcessHandle for ProcessHandle

Source§

fn try_into_process_handle(&self) -> Result<ProcessHandle>

Attempt to turn a type into a ProcessHandle. Whilst Linux provides the same type for Pids and ProcessHandles, Windows and macOS do not. As such, you need to ensure that try_into_process_handle is called on all Pids to ensure cross-platform capabilities. Read more