[*] Always reset the sigaction mask (sigemptyset)

This commit is contained in:
Reece Wilson 2022-04-07 05:41:16 +01:00
parent d81d4564e9
commit fb287e6128
4 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,6 @@ namespace Aurora::Exit
.sa_handler = SIG_DFL, .sa_handler = SIG_DFL,
.sa_flags = SA_ONSTACK .sa_flags = SA_ONSTACK
}; };
sigemptyset(&action.sa_mask); sigemptyset(&action.sa_mask);
sigaction(SIGINT, &action, nullptr); sigaction(SIGINT, &action, nullptr);

View File

@ -154,7 +154,6 @@ namespace Aurora::Grug
return; return;
} }
//AU_LOCK_GUARD(gMutex);
gCondVar->Signal(); gCondVar->Signal();
} }

View File

@ -337,6 +337,7 @@ namespace Aurora::Processes
.sa_handler = SigChldHandler, .sa_handler = SigChldHandler,
.sa_flags = SA_ONSTACK .sa_flags = SA_ONSTACK
}; };
sigemptyset(&action.sa_mask);
sigaction(SIGCHLD, &action, nullptr); sigaction(SIGCHLD, &action, nullptr);
} }
@ -347,6 +348,7 @@ namespace Aurora::Processes
.sa_handler = SIG_DFL, .sa_handler = SIG_DFL,
.sa_flags = SA_ONSTACK | SA_NOCLDWAIT .sa_flags = SA_ONSTACK | SA_NOCLDWAIT
}; };
sigemptyset(&action.sa_mask);
sigaction(SIGCHLD, &action, nullptr); sigaction(SIGCHLD, &action, nullptr);
gRWLock.reset(); gRWLock.reset();

View File

@ -42,7 +42,7 @@ namespace Aurora::Threading::Primitives
} }
else else
{ {
struct timespec tspec, start; struct timespec tspec;
Time::ms2tsabs(&tspec, timeout); Time::ms2tsabs(&tspec, timeout);
auto ret = pthread_cond_timedwait(&pthreadCv_, mutex, &tspec); auto ret = pthread_cond_timedwait(&pthreadCv_, mutex, &tspec);