diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/sys/signal.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/sys/signal.rs b/src/sys/signal.rs index 1cc3f393..112a7bcd 100644 --- a/src/sys/signal.rs +++ b/src/sys/signal.rs @@ -350,12 +350,11 @@ impl SigAction { } } -pub fn sigaction(signum: SigNum, sigaction: &SigAction) -> Result<SigAction> { - let mut oldact = unsafe { mem::uninitialized::<sigaction_t>() }; +pub unsafe fn sigaction(signum: SigNum, sigaction: &SigAction) -> Result<SigAction> { + let mut oldact = mem::uninitialized::<sigaction_t>(); - let res = unsafe { - ffi::sigaction(signum, &sigaction.sigaction as *const sigaction_t, &mut oldact as *mut sigaction_t) - }; + let res = + ffi::sigaction(signum, &sigaction.sigaction as *const sigaction_t, &mut oldact as *mut sigaction_t); if res < 0 { return Err(Error::Sys(Errno::last())); |