1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
Author: Myhailo Danylenko <isbear@isbear.org.ua>
Last-Update: 2017-05-15
Bug-Debian: https://bugs.debian.org/862594
Origin: https://bugs.freedesktop.org/show_bug.cgi?id=94849
Description: Fix the problem when using libasyncns with pthreads support,
it freezes entire application, when you try to asyncns_free() instance,
that have one of its workers blocked by getaddrinfo() (worker may be
blocked eg. because of some problem with resolver servers).
FIXME: Needs review
--- a/libasyncns/asyncns.c 2016-03-19 19:13:00.774406379 +0200
+++ b/libasyncns/asyncns.c 2016-03-19 19:13:02.378415461 +0200
@@ -865,6 +865,7 @@
break;
}
#else
+ pthread_cancel(asyncns->workers[p]);
for (;;) {
if (pthread_join(asyncns->workers[p], NULL) != EINTR)
break;
|