Making A Thread Join-able In order to put a thread in the 'join-able' state, it has to be initially created in the join-able state. Some some threading stacks, 'join-able' is the default state, but a portable program should NOT rely on this. int thr_id; /* ID of new thread */ pthread_attr_t thr_attr; /* attributes for thread creation. */ pthread_t thr; /* thread's handle */ int detach_state; /* detach state */ /* initialize the attribute. */ if (pthread_attr_init(&thr_attr) != 0) { /* handle error... */ } /* set the 'detached' attribute to 'false'. */ detach_state = PTHREAD_CREATE_JOINABLE; if (pthread_attr_getdetachstate(&thr_attr, &detach_state) != 0) { /* handle error... */ }