Struct SignalFd
struct SignalFd(_)
A helper struct for creating, reading and closing a signalfd instance.
Important: please read the module level documentation about signal discarding before using this struct!
Examples
# use *;
// Set the thread to block the SIGUSR1 signal, otherwise the default handler will be used
let mut mask = empty;
mask.add;
mask.thread_block.unwrap;
// Signals are queued up on the file descriptor
let mut sfd = with_flags.unwrap;
match sfd.read_signal
Implementations
impl SignalFd
fn new(mask: &SigSet) -> Result<SignalFd>fn with_flags(mask: &SigSet, flags: SfdFlags) -> Result<SignalFd>fn set_mask(self: &Self, mask: &SigSet) -> Result<()>fn read_signal(self: &Self) -> Result<Option<siginfo>>unsafe fn from_owned_fd(fd: OwnedFd) -> SelfConstructs a
SignalFdwrapping an existingOwnedFd.Safety
OwnedFdis a validSignalFd.
impl AsFd for SignalFd
fn as_fd(self: &Self) -> BorrowedFd<'_>
impl AsRawFd for SignalFd
fn as_raw_fd(self: &Self) -> RawFd
impl Debug for SignalFd
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Freeze for SignalFd
impl Iterator for SignalFd
fn next(self: &mut Self) -> Option<<Self as >::Item>
impl RefUnwindSafe for SignalFd
impl Send for SignalFd
impl Sync for SignalFd
impl Unpin for SignalFd
impl UnsafeUnpin for SignalFd
impl UnwindSafe for SignalFd
impl<I> IntoIterator for SignalFd
fn into_iter(self: Self) -> I
impl<T> Any for SignalFd
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for SignalFd
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for SignalFd
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for SignalFd
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into for SignalFd
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for SignalFd
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for SignalFd
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>