Returns the detached state of a thread attribute object.
#include <pthread.h>
int pthread_attr_getdetachstate (
const pthread_attr_t *attr,
int *detachstate);
(IN) Points to the attribute object.
(OUT) Points to the detached state value which will be either PTHREAD_CREATE_JOINABLE or PTHREAD_CREATE_DETACHED.
If successful, returns zero; otherwise returns a nonzero error code:
The pthread_attr_init function initializes the detached state attribute to PTHREAD_CREATE_JOINABLE.