projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ff6f4d
)
sd-resolve: simplify pthread_join() call
author
Michal Schmidt
<mschmidt@redhat.com>
Thu, 5 Nov 2015 12:44:15 +0000
(13:44 +0100)
committer
Michal Schmidt
<mschmidt@redhat.com>
Thu, 5 Nov 2015 12:44:15 +0000
(13:44 +0100)
POSIX says:
The pthread_join() function shall not return an error code of [EINTR].
src/libsystemd/sd-resolve/sd-resolve.c
patch
|
blob
|
history
diff --git
a/src/libsystemd/sd-resolve/sd-resolve.c
b/src/libsystemd/sd-resolve/sd-resolve.c
index
4876760
..
34a0b03
100644
(file)
--- 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++)