summary refs log tree commit diff
path: root/linuxthreads/Examples
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-11-14 00:29:07 +0000
committerRoland McGrath <roland@gnu.org>2002-11-14 00:29:07 +0000
commite2df2b3e64a97bc698d6492402a94c8b7131963a (patch)
tree1d68f3aa6849171d5e83c6ebd8db776fce0b0401 /linuxthreads/Examples
parentba441d2c89f72532ba4b0ceeb9c6cfc5df18c02a (diff)
downloadglibc-e2df2b3e64a97bc698d6492402a94c8b7131963a.tar.gz
glibc-e2df2b3e64a97bc698d6492402a94c8b7131963a.tar.xz
glibc-e2df2b3e64a97bc698d6492402a94c8b7131963a.zip
2002-11-13 Roland McGrath <roland@redhat.com>
	* Examples/ex6.c (main): Improve error reporting.
Diffstat (limited to 'linuxthreads/Examples')
-rw-r--r--linuxthreads/Examples/ex6.c5
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);