Commit 19e373b80315bde0d38472025ddd1da1ff916591

Con Kolivas 2011-12-30T11:31:16

All threads are detached so there is no need to join them and it may dereference causing crash on exit.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/util.c b/util.c
index a9a3296..0657bba 100644
--- a/util.c
+++ b/util.c
@@ -682,9 +682,8 @@ void thr_info_cancel(struct thr_info *thr)
 		tq_freeze(thr->q);
 
 	if (PTH(thr) != 0L) {
-			if (!pthread_cancel(thr->pth))
-				pthread_join(thr->pth, NULL);
-			PTH(thr) = 0L;
+		pthread_cancel(thr->pth);
+		PTH(thr) = 0L;
 	}
 }