pthread_detach(3P) pthread_detach(3P) NAME pthread_detach - detach a thread C SYNOPSIS #include <pthread.h> int pthread_detach(pthread_t thread); DESCRIPTION The pthread_detach() function causes the thread identified by thread to be detached. This means that storage created by the library on behalf of the thread will be reclaimed when the thread terminates. A detached thread cannot be the target of pthread_join(). A thread can be created in detached state using pthread_attr_setdetachstate(). It can also be implicitly detached using pthread_join(). DIAGNOSTICS On success pthread_detach() returns zero; otherwise an error number is returned: [ESRCH] The thread parameter does not identify a thread. [EINVAL] The thread identified by thread is already detached. SEE ALSO pthread_join(3P), pthread_attr_setdetachstate(3P). Page 1[top]
Vote for polarhome |