sd-resolve: simplify pthread_join() call

POSIX says:
The pthread_join() function shall not return an error code of [EINTR].
This commit is contained in:
Michal Schmidt 2015-11-05 13:44:15 +01:00
parent 6ff6f4d851
commit 5263a45b5c

View file

@ -584,12 +584,8 @@ static void resolve_free(sd_resolve *resolve) {
}
/* Now terminate them and wait until they are gone. */
for (i = 0; i < resolve->n_valid_workers; i++) {
for (;;) {
if (pthread_join(resolve->workers[i], NULL) != EINTR)
break;
}
}
for (i = 0; i < resolve->n_valid_workers; i++)
pthread_join(resolve->workers[i], NULL);
/* Close all communication channels */
for (i = 0; i < _FD_MAX; i++)