pub struct PidFd(/* private fields */);
Expand description
A process file descriptor.
Implementations§
Source§impl PidFd
impl PidFd
Sourcepub fn from_pid(pid: pid_t) -> Result<Self>
pub fn from_pid(pid: pid_t) -> Result<Self>
Create a process file descriptor from a PID.
You can get a process ID from std::process::Child
by calling Child::id
.
As long as this process has not yet waited on the child process, and has not blocked
SIGCHLD
, the process ID will not get reused, so it does not matter if the child process
has already exited.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PidFd
impl RefUnwindSafe for PidFd
impl Send for PidFd
impl Sync for PidFd
impl Unpin for PidFd
impl UnwindSafe for PidFd
Blanket Implementations§
Source§impl<T> AsRawFilelike for Twhere
T: AsRawFd,
impl<T> AsRawFilelike for Twhere
T: AsRawFd,
Source§fn as_raw_filelike(&self) -> i32
fn as_raw_filelike(&self) -> i32
Returns the raw value.
Source§impl<T> AsRawSocketlike for Twhere
T: AsRawFd,
impl<T> AsRawSocketlike for Twhere
T: AsRawFd,
Source§fn as_raw_socketlike(&self) -> i32
fn as_raw_socketlike(&self) -> i32
Returns the raw value.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more