[][src]Struct sys_util::SignalFd

pub struct SignalFd { /* fields omitted */ }

A safe wrapper around a Linux signalfd (man 2 signalfd).

A signalfd can be used for non-synchronous signals (such as SIGCHLD) so that signals can be processed without the use of a signal handler.

Methods

impl SignalFd[src]

pub fn new(signal: c_int) -> Result<SignalFd, Error>[src]

Creates a new SignalFd for the given signal, blocking the normal handler for the signal as well. Since we mask out the normal handler, this is a risky operation - signal masking will persist across fork and even exec so the user of SignalFd should think long and hard about when to mask signals.

pub fn read(&self) -> Result<Option<signalfd_siginfo>, Error>[src]

Read a siginfo struct from the signalfd, if available.

Trait Implementations

impl Drop for SignalFd[src]

impl AsRawFd for SignalFd[src]

Auto Trait Implementations

impl Send for SignalFd

impl Sync for SignalFd

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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