Function nix::sys::uio::process_vm_writev
source · pub fn process_vm_writev(
pid: Pid,
local_iov: &[IoSlice<'_>],
remote_iov: &[RemoteIoVec],
) -> Result<usize>
Expand description
Write data directly to another process’s virtual memory
(see process_vm_writev
(2)).
local_iov
is a list of IoSlice
s containing the data to be written,
and remote_iov
is a list of RemoteIoVec
s identifying where the
data should be written in the target process. On success, returns the
number of bytes written, which will always be a whole
number of remote_iov
chunks.
This requires the same permissions as debugging the process using
ptrace: you must either be a privileged process (with
CAP_SYS_PTRACE
), or you must be running as the same user as the
target process and the OS must have unprivileged debugging enabled.
This function is only available on Linux and Android(SDK23+).