diff options
Diffstat (limited to 'lib/libthr/thread/thr_exit.c')
-rw-r--r-- | lib/libthr/thread/thr_exit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libthr/thread/thr_exit.c b/lib/libthr/thread/thr_exit.c index 6a45687..f74b5e1 100644 --- a/lib/libthr/thread/thr_exit.c +++ b/lib/libthr/thread/thr_exit.c @@ -195,7 +195,8 @@ deadlist_free_threads() TAILQ_FOREACH_SAFE(ptd, &_dead_list, dle, ptdTemp) { /* Don't destroy the initial thread or non-detached threads. */ if (ptd == _thread_initial || - (ptd->attr.flags & PTHREAD_DETACHED) == 0) + (ptd->attr.flags & PTHREAD_DETACHED) == 0 || + !ptd->isdead) continue; TAILQ_REMOVE(&_dead_list, ptd, dle); deadlist_free_onethread(ptd); |