pthread_detach - detach a thread
int pthread_detach(pthread_t thread);
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
On success pthread_detach() returns zero; otherwise an error number is
[ESRCH] The thread parameter does not identify a thread.
[EINVAL] The thread identified by thread is already detached.
PPPPaaaaggggeeee 1111 [ Back ]