From e2df2b3e64a97bc698d6492402a94c8b7131963a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 14 Nov 2002 00:29:07 +0000 Subject: [PATCH] 2002-11-13 Roland McGrath * Examples/ex6.c (main): Improve error reporting. --- linuxthreads/Examples/ex6.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/linuxthreads/Examples/ex6.c b/linuxthreads/Examples/ex6.c index f8ce066..9a02668 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); -- 2.7.4