Clear return code to zero if joiner successfully waited joinee.

Bug reported by: jasone at connonware when using ports lang/onyx
MFC after: 3 days
This commit is contained in:
davidxu 2005-12-19 03:20:55 +00:00
parent cac7998f8e
commit a8cc7e07c2

View File

@ -127,6 +127,7 @@ join_common(pthread_t pthread, void **thread_return,
pthread->joiner = NULL;
THREAD_LIST_UNLOCK(curthread);
} else {
ret = 0;
tmp = pthread->ret;
THREAD_LIST_LOCK(curthread);
pthread->tlflags |= TLFLAGS_DETACHED;