1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-02-02 10:04:33 +00:00

Only pthread_join when pthread_cancel does not return an error.

This commit is contained in:
Con Kolivas 2011-12-26 09:29:16 +11:00
parent 13c40f753b
commit 59293a37d6

2
util.c
View File

@ -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;
}