mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-07 17:17:44 +03:00
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:
parent
6ff6f4d851
commit
5263a45b5c
@ -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++)
|
||||
|
Loading…
Reference in New Issue
Block a user