mirror of
git://sourceware.org/git/glibc.git
synced 2025-01-18 12:16:13 +08:00
2002-11-13 Roland McGrath <roland@redhat.com>
* Examples/ex6.c (main): Improve error reporting.
This commit is contained in:
parent
ba441d2c89
commit
e2df2b3e64
@ -34,9 +34,10 @@ main (void)
|
|||||||
printf ("count = %lu\n", count);
|
printf ("count = %lu\n", count);
|
||||||
}
|
}
|
||||||
/* pthread_detach (thread); */
|
/* 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;
|
return 2;
|
||||||
}
|
}
|
||||||
usleep (10);
|
usleep (10);
|
||||||
|
Loading…
Reference in New Issue
Block a user