aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads/Examples
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads/Examples')
-rw-r--r--linuxthreads/Examples/ex6.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/linuxthreads/Examples/ex6.c b/linuxthreads/Examples/ex6.c
index 15914ce..05f92b6 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;