Function linux_api::signal::rt_sigaction_raw

source ·
pub unsafe fn rt_sigaction_raw(
    signo: i32,
    new_action: *const sigaction,
    old_action: *mut sigaction,
    sigsetsize: usize,
) -> Result<(), Errno>
Expand description

Calls the rt_sigaction syscall.

§Safety

  • new_action must be safe to dereference.
  • old_action must be safe to write to. (uninitd is ok).
  • new_action’s handler must be safe to call as a signal handler. See signal-safety(7).
  • Generally, new_action must have SA_RESTORER set and a suitable restorer, such as sigaction_restorer. (There might be some esoteric way to call this syscall without this property, but I’m not aware of one).