#[repr(C)]pub struct sigaction(/* private fields */);
Expand description
§Invariants
sigaction
does not require or guarantee that its internal function
pointers, if any, are safe to call/dereference.
Implementations§
source§impl sigaction
impl sigaction
sourcepub fn new_raw(
handler: SignalHandler,
flags: SigActionFlags,
mask: sigset_t,
restorer: Option<unsafe extern "C" fn()>,
) -> Self
pub fn new_raw( handler: SignalHandler, flags: SigActionFlags, mask: sigset_t, restorer: Option<unsafe extern "C" fn()>, ) -> Self
Consider sigaction::new_with_default_restorer
instead, which takes
care of setting up a restorer.
panics if handler
is inconsistent with the presence or absence of the
SA_SIGINFO
flag.
sourcepub fn new_with_default_restorer(
handler: SignalHandler,
flags: SigActionFlags,
mask: sigset_t,
) -> Self
pub fn new_with_default_restorer( handler: SignalHandler, flags: SigActionFlags, mask: sigset_t, ) -> Self
Creates a sigaction
with SA_RESTORER
set, and the internal
restorer
field set to sigaction_restorer
. The libc sigaction
function normally makes these changes to the provided struct sigaction
.
pub fn wrap(si: linux_sigaction) -> Self
pub fn wrap_ref(si: &linux_sigaction) -> &Self
pub fn wrap_mut(si: &mut linux_sigaction) -> &mut Self
sourcepub unsafe fn peel(si: Self) -> linux_sigaction
pub unsafe fn peel(si: Self) -> linux_sigaction
§Safety
lsa_handler
is safe to dereference iff the lsa_handler
used to
construct Self
is.
pub fn flags(&self) -> Option<SigActionFlags>
pub fn flags_retain(&self) -> SigActionFlags
pub fn mask(&self) -> sigset_t
sourcepub unsafe fn handler(&self) -> SignalHandler
pub unsafe fn handler(&self) -> SignalHandler
§Safety
The functions in SignalHandler::Action
or SignalHandler::Handler
are
safe to call iff the function pointer in the internal lsa_handler
is,
and is of the type specified in the internal lsa_flags
.
pub fn is_ignore(&self) -> bool
pub fn is_default(&self) -> bool
Trait Implementations§
impl Copy for sigaction
impl Pod for sigaction
Auto Trait Implementations§
impl Freeze for sigaction
impl RefUnwindSafe for sigaction
impl Send for sigaction
impl Sync for sigaction
impl Unpin for sigaction
impl UnwindSafe for sigaction
Blanket Implementations§
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)