aboutsummaryrefslogtreecommitdiff
path: root/src/rc/rc-misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rc/rc-misc.c')
-rw-r--r--src/rc/rc-misc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/rc/rc-misc.c b/src/rc/rc-misc.c
index 50101b43..59a52615 100644
--- a/src/rc/rc-misc.c
+++ b/src/rc/rc-misc.c
@@ -432,13 +432,12 @@ bool service_plugable (const char *service)
return (allow);
}
-void signal_setup (int sig, void (*handler)(int))
+int signal_setup (int sig, void (*handler)(int))
{
struct sigaction sa;
memset (&sa, 0, sizeof (sa));
- sa.sa_handler = handler;
sigemptyset (&sa.sa_mask);
- if (sigaction (sig, &sa, NULL) == -1)
- eerrorx ("sigaction: %s", strerror (errno));
+ sa.sa_handler = handler;
+ return (sigaction (sig, &sa, NULL));
}