diff options
Diffstat (limited to 'netlink-notify.c')
-rw-r--r-- | netlink-notify.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/netlink-notify.c b/netlink-notify.c index 7359e0f..29fc2fe 100644 --- a/netlink-notify.c +++ b/netlink-notify.c @@ -540,8 +540,11 @@ int main (int argc, char **argv) { goto out30; } - signal(SIGINT, received_signal); - signal(SIGTERM, received_signal); + struct sigaction act = { 0 }; + act.sa_handler = received_signal; + + sigaction(SIGINT, &act, NULL); + sigaction(SIGTERM, &act, NULL); #ifdef HAVE_SYSTEMD sd_notify(0, "READY=1\nSTATUS=Waiting for netlink events..."); |