diff options
author | Roland McGrath <roland@gnu.org> | 2002-11-14 00:29:07 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2002-11-14 00:29:07 +0000 |
commit | e2df2b3e64a97bc698d6492402a94c8b7131963a (patch) | |
tree | 1d68f3aa6849171d5e83c6ebd8db776fce0b0401 | |
parent | ba441d2c89f72532ba4b0ceeb9c6cfc5df18c02a (diff) | |
download | glibc-e2df2b3e64a97bc698d6492402a94c8b7131963a.zip glibc-e2df2b3e64a97bc698d6492402a94c8b7131963a.tar.gz glibc-e2df2b3e64a97bc698d6492402a94c8b7131963a.tar.bz2 |
2002-11-13 Roland McGrath <roland@redhat.com>
* Examples/ex6.c (main): Improve error reporting.
-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 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); |