原型:
int pthread_join(thread_t tid, void **status);
#include <pthread.h>
pthread_t tid;
int ret;
void *status;
/* waiting to join thread "tid" with status */
ret = pthread_join(tid, &status);
/* waiting to join thread "tid" without status */
ret = pthread_join(tid, NULL);
果检测到以下任一情况,pthread_join() 将失败并返回相应的值。