#include <pthread.h> int pthread_attr_setdetachstate( pthread_attr_t *attr, int detachstate );
The pthread_attr_setdetachstate routine is used to value of the
detachstate attribute. This attribute controls whether the
thread is created in a detached state.
The detachstate can be either PTHREAD_CREATE_DETACHED or
PTHREAD_CREATE_JOINABLE. The default value for all threads is
PTHREAD_CREATE_JOINABLE.
If a thread is in a detached state,
then the use of the ID with the pthread_detach or
pthread_join routines is an error.
Copyright © 1988-2004 OAR Corporation