Correctly return exit code from thd_join on Windows
This commit is contained in:
parent
26246af977
commit
17767b5f2b
@ -14,7 +14,8 @@ void
|
|||||||
thd_join(thd_t thd, void **ret)
|
thd_join(thd_t thd, void **ret)
|
||||||
{
|
{
|
||||||
|
|
||||||
WaitForSingleObject(thd, INFINITE);
|
if (WaitForSingleObject(thd, INFINITE) == WAIT_OBJECT_0 && ret)
|
||||||
|
GetExitCodeThread(thd, (LPDWORD) ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user