diff options
-rw-r--r-- | linuxthreads/Examples/ex6.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/linuxthreads/Examples/ex6.c b/linuxthreads/Examples/ex6.c index f8ce0662c2..9a0266828b 100644 --- a/linuxthreads/Examples/ex6.c +++ b/linuxthreads/Examples/ex6.c @@ -34,9 +34,10 @@ main (void) printf ("count = %lu\n", count); } /* pthread_detach (thread); */ - if (pthread_join (thread, NULL) != 0) + int err = pthread_join (thread, NULL); + if (err != 0) { - printf ("join failed, count %lu\n", count); + printf ("join failed (%s), count %lu\n", strerror (err), count); return 2; } usleep (10); |