summaryrefslogtreecommitdiff
path: root/libc/signal/sysv_signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/signal/sysv_signal.c')
-rw-r--r--libc/signal/sysv_signal.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libc/signal/sysv_signal.c b/libc/signal/sysv_signal.c
index c0cd19a95..f573482f9 100644
--- a/libc/signal/sysv_signal.c
+++ b/libc/signal/sysv_signal.c
@@ -47,10 +47,8 @@ __sighandler_t __sysv_signal (int sig, __sighandler_t handler)
}
act.sa_handler = handler;
- if (__sigemptyset (&act.sa_mask) < 0)
- return SIG_ERR;
- act.sa_flags = SA_ONESHOT | SA_NOMASK | SA_INTERRUPT;
- act.sa_flags &= ~SA_RESTART;
+ __sigemptyset (&act.sa_mask);
+ act.sa_flags = (SA_ONESHOT | SA_NOMASK | SA_INTERRUPT) & ~SA_RESTART;
if (sigaction (sig, &act, &oact) < 0)
return SIG_ERR;