summaryrefslogtreecommitdiff
path: root/initd
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-09-01 00:00:40 +0200
committerDavid Oberhollenzer <david.oberhollenzer@tele2.at>2018-09-01 00:00:40 +0200
commitb0b6c68e3839656c657f83de70badace6c01675a (patch)
treed4bbd11c24fb8ccf1de7939e52e57c948491f70c /initd
parentbb16d1f1bf210d0ac6f92fa5601a60e3639cbfb9 (diff)
Only enable signals in signalfd that initd actually handles
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
Diffstat (limited to 'initd')
-rw-r--r--initd/signal_linux.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/initd/signal_linux.c b/initd/signal_linux.c
index aed049b..9d5d29d 100644
--- a/initd/signal_linux.c
+++ b/initd/signal_linux.c
@@ -30,6 +30,11 @@ int sigsetup(void)
return -1;
}
+ sigemptyset(&mask);
+ sigaddset(&mask, SIGCHLD);
+ sigaddset(&mask, SIGINT);
+ sigaddset(&mask, SIGTERM);
+
sfd = signalfd(-1, &mask, SFD_CLOEXEC);
if (sfd == -1) {
perror("signalfd");