pub unsafe fn sigaction(signal: Signal, sigaction: &SigAction) -> Result<SigAction> {
    let mut oldact = mem::uninitialized::<libc::sigaction>();

    let res =
        libc::sigaction(signal as libc::c_int, &sigaction.sigaction as *const libc::sigaction, &mut oldact as *mut libc::sigaction);

    Errno::result(res).map(|_| SigAction { sigaction: oldact })
}
/// Changes the action taken by a process on receipt of a specific signal.
///
/// `signal` can be any signal except `SIGKILL` or `SIGSTOP`. On success, it returns the previous
/// action for the given signal. If `sigaction` fails, no new signal handler is installed.
///
/// # Safety
///
/// Signal handlers may be called at any point during execution, which limits what is safe to do in
/// the body of the signal-catching function. Be certain to only make syscalls that are explicitly
/// marked safe for signal handlers and only share global data using atomics.
Changes the action taken by a process on receipt of a specific signal.
Changes the action taken by a process on receipt of a specific signal .
pub unsafe fn sigaction(signal: Signal, sigaction: &SigAction) -> Result<SigAction> {
    let mut oldact = mem::uninitialized::<libc::sigaction>();
    let res =
        libc::sigaction(signal as libc::c_int, &sigaction.sigaction as *const libc::sigaction, &mut oldact as *mut libc::sigaction);
    Errno::result(res).map(|_| SigAction { sigaction: oldact })
}
pub unsafe fn sigaction ( signal : Signal , sigaction : & SigAction ) -> Result < SigAction > { let mut oldact = mem :: uninitialized :: < libc :: sigaction > ( ) ; let res = libc :: sigaction ( signal as libc :: c_int , & sigaction . sigaction as * const libc :: sigaction , & mut oldact as * mut libc :: sigaction ) ; Errno :: result ( res ) . map ( | _ | SigAction { sigaction : oldact } ) }
Changes the action taken by a process on receipt of a specific signal.
Changes the action taken by a process on receipt of a specific signal .
signal
Signal
sigaction
&SigAction
signal
Signal
sigaction
&SigAction
safety
Signal handlers may be called at any point during execution, which limits what is safe to do in
the body of the signal-catching function. Be certain to only make syscalls that are explicitly
marked safe for signal handlers and only share global data using atomics.
Signal handlers may be called at any point during execution which limits what is safe to do in the body of the signal - catching function . Be certain to only make syscalls that are explicitly marked safe for signal handlers and only share global data using atomics .