Skip to content
Snippets Groups Projects
Commit 2ba6b268 authored by GHC GitLab CI's avatar GHC GitLab CI
Browse files

OSThreads: Fix error code checking

pthread_join returns its error code and apparently doesn't set errno.

(cherry picked from commit c488ac73)
parent de7f2203
No related branches found
No related tags found
No related merge requests found
...@@ -380,8 +380,9 @@ interruptOSThread (OSThreadId id) ...@@ -380,8 +380,9 @@ interruptOSThread (OSThreadId id)
void void
joinOSThread (OSThreadId id) joinOSThread (OSThreadId id)
{ {
if (pthread_join(id, NULL) != 0) { int ret = pthread_join(id, NULL);
sysErrorBelch("joinOSThread: error %d", errno); 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