diff options
Diffstat (limited to 'linuxthreads/Examples')
-rw-r--r-- | linuxthreads/Examples/ex6.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/linuxthreads/Examples/ex6.c b/linuxthreads/Examples/ex6.c index 15914ce85d..05f92b6a71 100644 --- a/linuxthreads/Examples/ex6.c +++ b/linuxthreads/Examples/ex6.c @@ -34,7 +34,11 @@ main (void) printf ("count = %lu\n", count); } /* pthread_detach (thread); */ - pthread_join (thread, NULL); + if (pthread_join (thread, NULL) != 0) + { + printf ("join failed, count %lu\n", count); + return 2; + } usleep (10); } return 0; |