Skip to content
Snippets Groups Projects
Commit c488ac73 authored by GHC GitLab CI's avatar GHC GitLab CI Committed by Ben Gamari
Browse files

OSThreads: Fix error code checking

pthread_join returns its error code and apparently doesn't set errno.
parent 134f7599
No related branches found
No related tags found
No related merge requests found
......@@ -401,8 +401,9 @@ interruptOSThread (OSThreadId id)
void
joinOSThread (OSThreadId id)
{
if (pthread_join(id, NULL) != 0) {
sysErrorBelch("joinOSThread: error %d", errno);
int ret = pthread_join(id, NULL);
if (ret != 0) {
sysErrorBelch("joinOSThread: error %d", ret);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment