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
|
||||
pthread_join(pthread_t thread, void **value_ptr)
|
||||
{
|
||||
wait_for_thread(thread, (status_t *)value_ptr);
|
||||
/* the thread could be joinable and gone */
|
||||
return B_OK;
|
||||
status_t error = wait_for_thread(thread, (status_t *)value_ptr);
|
||||
if (error == B_BAD_THREAD_ID)
|
||||
return ESRCH;
|
||||
return error;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user