Add missing asignment of return code in wait_for_thread_etc().
While it was detected that the thread is in the destruction phase and that it was necessary to wait and then have a valid status code in the death entry, that status code wasn't actually returned. This lead to uninitialized values for the return code even though wait_for_thread[_etc]() would return B_OK.
This commit is contained in:
@@ -2563,6 +2563,9 @@ wait_for_thread_etc(thread_id id, uint32 flags, bigtime_t timeout,
|
|||||||
// middle of the cleanup.
|
// middle of the cleanup.
|
||||||
acquire_sem(exitSem);
|
acquire_sem(exitSem);
|
||||||
status = B_OK;
|
status = B_OK;
|
||||||
|
|
||||||
|
if (_returnCode != NULL)
|
||||||
|
*_returnCode = death.status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user