diff options
-rw-r--r-- | rts/posix/OSThreads.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rts/posix/OSThreads.c b/rts/posix/OSThreads.c index e5cf9e6d6a..6c09f86c7f 100644 --- a/rts/posix/OSThreads.c +++ b/rts/posix/OSThreads.c @@ -380,8 +380,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); } } |