From 085e0ec955713a12d2abf9bd181ffc2a360cba78 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sat, 2 Dec 2006 17:50:37 +0100 Subject: [PATCH] dns plugin: Use `pthread_sigmask' rather than `signal'. --- src/dns.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/dns.c b/src/dns.c index da45a389..61b5a1bd 100644 --- a/src/dns.c +++ b/src/dns.c @@ -263,10 +263,12 @@ static void *dns_child_loop (void *dummy) struct pollfd poll_fds[1]; int status; - /* Don't catch these signals */ - /* FIXME: Really? */ - signal (SIGINT, SIG_DFL); - signal (SIGTERM, SIG_DFL); + /* Don't block any signals */ + { + sigset_t sigmask; + sigemptyset (&sigmask); + pthread_sigmask (SIG_SETMASK, &sigmask, NULL); + } /* Passing `pcap_device == NULL' is okay and the same as passign "any" */ DBG ("Creating PCAP object.."); -- 2.11.0