diff options
author | David Oberhollenzer <david.oberhollenzer@tele2.at> | 2018-09-01 00:00:40 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@tele2.at> | 2018-09-01 00:00:40 +0200 |
commit | b0b6c68e3839656c657f83de70badace6c01675a (patch) | |
tree | d4bbd11c24fb8ccf1de7939e52e57c948491f70c /initd/signal_linux.c | |
parent | bb16d1f1bf210d0ac6f92fa5601a60e3639cbfb9 (diff) |
Only enable signals in signalfd that initd actually handles
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
Diffstat (limited to 'initd/signal_linux.c')
-rw-r--r-- | initd/signal_linux.c | 5 |
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"); |