aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/sig_handlers.c3
-rw-r--r--src/signal_check.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/sig_handlers.c b/src/sig_handlers.c
index a1bbb5379..7eab68b6f 100644
--- a/src/sig_handlers.c
+++ b/src/sig_handlers.c
@@ -125,6 +125,7 @@ void masterInitSigHandlers() {
struct sigaction sa;
sa.sa_flags = 0;
+ sigemptyset(&sa.sa_mask);
sa.sa_handler = SIG_IGN;
while(sigaction(SIGPIPE,&sa,NULL)<0 && errno==EINTR);
sa.sa_handler = masterChldSigHandler;
@@ -141,6 +142,7 @@ void initSigHandlers() {
struct sigaction sa;
sa.sa_flags = 0;
+ sigemptyset(&sa.sa_mask);
sa.sa_handler = SIG_IGN;
while(sigaction(SIGPIPE,&sa,NULL)<0 && errno==EINTR);
sa.sa_handler = chldSigHandler;
@@ -165,6 +167,7 @@ void setSigHandlersForDecoder() {
finishSigHandlers();
sa.sa_flags = 0;
+ sigemptyset(&sa.sa_mask);
sa.sa_handler = SIG_IGN;
while(sigaction(SIGHUP,&sa,NULL)<0 && errno==EINTR);
while(sigaction(SIGINT,&sa,NULL)<0 && errno==EINTR);
diff --git a/src/signal_check.c b/src/signal_check.c
index ab6ffce74..5764f9051 100644
--- a/src/signal_check.c
+++ b/src/signal_check.c
@@ -33,6 +33,7 @@ static void __set_signal_handler(int sig, void (* handler)(int))
{
struct sigaction act;
act.sa_flags = 0;
+ sigemptyset(&act.sa_mask);
act.sa_handler = handler;
while(sigaction(sig, &act, NULL) && errno==EINTR);
}