NAME pthread_join - join with a terminated thread LIBRARY POSIX threads library ( libpthread , -lpthread ) SYNOPSIS ... include int pthread_join(pthread_t thread , void ** retval…same process that calls pthread_join (3). • It returns from start_routine (). This is equivalent ... joinable, then another thread can call pthread_join (3) to wait for the threadoperate in the same way as pthread_join (3), except for the differences described ... blocking, as is done by pthread_join (3), the call returns an error. The pthreadoperate in the same way as pthread_join (3), except for the differences described ... blocking, as is done by pthread_join (3), the call returns an error. The pthreadjoin with that thread using pthread_join (3) obtains PTHREAD_CANCELED as the thread ... what its exit status was. */ s = pthread_join(thr, &res); if (s != 0) handle_errorjoined with pthread_join (3) or be made joinable again. A new thread ... main thread returns). Either pthread_join (3) or pthread_detach () should be called for eachshould eventually either be joined using pthread_join (3) or detached using pthread_detach ... call to pthread_detach (3) or pthread_join (3). EXAMPLES See pthread_attr_initshould eventually either be joined using pthread_join (3) or detached using pthread_detach ... call to pthread_detach (3) or pthread_join (3). EXAMPLES See pthread_attr_initsame process that calls pthread_join (3). Any clean-up handlers established by pthread_cleanup ... exit (). SEE ALSO pthread_create (3), pthread_join (3), pthreadsthread_name); rc = pthread_join(thread, NULL); if (rc != 0) errc(EXIT_FAILURE, rc, "pthreadthread_name); rc = pthread_join(thread, NULL); if (rc != 0) errc(EXIT_FAILURE, rc, "pthreaderror_en(s, "pthread_cancel"); } s = pthread_join(thr, &res); if (s != 0) handle_error ... pthread_join"); if (res == PTHREAD_CANCELED) printf("Thread was canceled; cnt = %d\n", cn…error_en(s, "pthread_cancel"); } s = pthread_join(thr, &res); if (s != 0) handle_error ... pthread_join"); if (res == PTHREAD_CANCELED) printf("Thread was canceled; cnt = %d\n", cn…pthread_attr_destroy"); } s = pthread_join(thread, NULL); if (s != 0) handle_error ... pthread_join"); exit(EXIT_SUCCESS); } SEE ALSO getrlimit (2), sched_get_priority_min (2), pth…pthread_attr_destroy"); } s = pthread_join(thread, NULL); if (s != 0) handle_error ... pthread_join"); exit(EXIT_SUCCESS); } SEE ALSO getrlimit (2), sched_get_priority_min (2), pth…