Expand description
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.
Fields§
§signalfd: File
§signal: c_int
Implementations§
source§impl SignalFd
impl SignalFd
sourcepub fn new(signal: c_int) -> Result<SignalFd, Error>
pub fn new(signal: c_int) -> Result<SignalFd, Error>
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.
Trait Implementations§
source§impl AsRawDescriptor for SignalFd
impl AsRawDescriptor for SignalFd
source§fn as_raw_descriptor(&self) -> RawDescriptor
fn as_raw_descriptor(&self) -> RawDescriptor
Returns the underlying raw descriptor. Read more