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
+4 -1
View File
@@ -124,7 +124,10 @@ void wait_sigint()
sigaddset(&set, SIGTERM);
sigprocmask(SIG_BLOCK, &set, NULL);
sigwaitinfo(&set, NULL);
while (sigwaitinfo(&set, NULL) == -1 && errno == EINTR)
{
/* wait for signal */
}
}
#ifndef HAVE_SIGWAITINFO