sigwaitinfo() may fail with EINTR if interrupted by an unblocked signal not in the set

Fixes #1213.
This commit is contained in:
Tobias Brunner
2015-11-23 11:37:19 +01:00
parent b675909662
commit 88b85e022a
9 changed files with 35 additions and 32 deletions
+1 -1
View File
@@ -565,7 +565,7 @@ int main(int argc, char *argv[])
sigaddset(&set, SIGTERM);
sigprocmask(SIG_BLOCK, &set, NULL);
while ((sig = sigwaitinfo(&set, NULL)) != -1)
while ((sig = sigwaitinfo(&set, NULL)) != -1 || errno == EINTR)
{
switch (sig)
{