Struct mio_pidfd::PidFd[][src]

pub struct PidFd { /* fields omitted */ }

A Linux pidfd abstraction that can be used to poll the exit status of multiple child processes using mio.

Implementations

impl PidFd[src]

pub fn new(child: &Child) -> Result<Self>[src]

Create a new pidfd from a child process. This may be registerd with a mio poll.

pub fn kill(&self, sig: c_int) -> Result<()>[src]

Send a signal to the process using the pidfd. Use std::process::Child::kill() over this. This kill() is here only for the completeness of the pidfd system calls abstraction.

pub fn open(pid: pid_t, flags: c_uint) -> Result<Self>[src]

Wrapper to pidfd_open system call. Use instead of new() when extra parameters are desired.

pub fn send_signal(
    &self,
    sig: c_int,
    info: Option<&siginfo_t>,
    flags: c_uint
) -> Result<()>
[src]

Wrapper to pidfd_send_signal system call. Use instead of kill() when extra parameters are desired.

Trait Implementations

impl AsRawFd for PidFd[src]

impl Drop for PidFd[src]

impl Source for PidFd[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.