Initialize sigaction.sa_mask to an empty set in a few places we forgot to

git-svn-id: https://svn.musicpd.org/mpd/trunk@4400 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
J. Alexander Treuman 2006-07-18 23:38:21 +00:00
parent ec19a53f23
commit 9774768b97
2 changed files with 4 additions and 0 deletions

View File

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

View File

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