Correctly return exit code from thd_join on Windows

This commit is contained in:
Mike Hommey 2014-05-28 14:06:30 +09:00 committed by Jason Evans
parent 26246af977
commit 17767b5f2b

View File

@ -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