Correctly return errors.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23004 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
3ae3b04bce
commit
c63bdde05e
@ -83,9 +83,10 @@ pthread_equal(pthread_t t1, pthread_t t2)
|
|||||||
int
|
int
|
||||||
pthread_join(pthread_t thread, void **value_ptr)
|
pthread_join(pthread_t thread, void **value_ptr)
|
||||||
{
|
{
|
||||||
wait_for_thread(thread, (status_t *)value_ptr);
|
status_t error = wait_for_thread(thread, (status_t *)value_ptr);
|
||||||
/* the thread could be joinable and gone */
|
if (error == B_BAD_THREAD_ID)
|
||||||
return B_OK;
|
return ESRCH;
|
||||||
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user