summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-resolve/sd-resolve.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2015-11-05 13:44:15 +0100
committerMichal Schmidt <mschmidt@redhat.com>2015-11-05 13:44:15 +0100
commit5263a45b5cb3e51b95253a0eab789e33c4010f20 (patch)
treeb7831af68e1227858538d94480e42cd740495cac /src/libsystemd/sd-resolve/sd-resolve.c
parent6ff6f4d851ba5b8e6f07a8e029986f13c2e63b9d (diff)
sd-resolve: simplify pthread_join() call
POSIX says: The pthread_join() function shall not return an error code of [EINTR].
Diffstat (limited to 'src/libsystemd/sd-resolve/sd-resolve.c')
-rw-r--r--src/libsystemd/sd-resolve/sd-resolve.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/libsystemd/sd-resolve/sd-resolve.c b/src/libsystemd/sd-resolve/sd-resolve.c
index 48767600c9..34a0b03f92 100644
--- a/src/libsystemd/sd-resolve/sd-resolve.c
+++ b/src/libsystemd/sd-resolve/sd-resolve.c
@@ -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++)