From: Roland McGrath Date: Thu, 14 Nov 2002 00:29:07 +0000 (+0000) Subject: 2002-11-13 Roland McGrath X-Git-Tag: cvs/initial~74 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e2df2b3e64a97bc698d6492402a94c8b7131963a;p=thirdparty%2Fglibc.git 2002-11-13 Roland McGrath * Examples/ex6.c (main): Improve error reporting. --- diff --git a/linuxthreads/Examples/ex6.c b/linuxthreads/Examples/ex6.c index f8ce0662c22..9a0266828b4 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);