mirror of
https://github.com/pygos/init.git
synced 2024-11-22 11:19:45 +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:
parent
bb16d1f1bf
commit
b0b6c68e38
1 changed files with 5 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue