1
0
Fork 0
mirror of https://github.com/pygos/init.git synced 2024-12-22 15:20:49 +01:00

Only enable signals in signalfd that initd actually handles

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
David Oberhollenzer 2018-09-01 00:00:40 +02:00
parent bb16d1f1bf
commit b0b6c68e38

View file

@ -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");