From 59293a37d6abaa879e6f24e26b206a3b318b2f79 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 26 Dec 2011 09:29:16 +1100 Subject: [PATCH] Only pthread_join when pthread_cancel does not return an error. --- util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.c b/util.c index 0ad8b7d8..0bf71dc2 100644 --- a/util.c +++ b/util.c @@ -681,7 +681,7 @@ void thr_info_cancel(struct thr_info *thr) if (thr->q) tq_freeze(thr->q); if (thr->pth) { - if (pthread_cancel(thr->pth)) + if (!pthread_cancel(thr->pth)) pthread_join(thr->pth, NULL); thr->pth = 0L; }