Browse Source

Only pthread_join when pthread_cancel does not return an error.

Con Kolivas 14 years ago
parent
commit
59293a37d6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      util.c

+ 1 - 1
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;
 	}