PTHREAD_DETACH(3) BSD Programmer's Manual PTHREAD_DETACH(3)NAMEpthread_detach - detach a running pthread
SYNOPSIS
#include <pthread.h>
int
pthread_detach(pthread_t tid);
DESCRIPTION
This interface is defined by IEEE Std1003.1c (``POSIX'').
The pthread_detach() function indicates to the thread scheduler that when
the thread specified by tid terminates the resources utilized by the
thread may be immediately reclaimed. No exit status is retained and made
available for another thread to retrieve.
RETURN VALUES
The pthread_detach() function returns 0 upon successful completion. If
an error occurs, a non-zero error value is returned.
ERRORS
The pthread_detach function may fail and return one of the following er-
rors:
[EINVAL] The value specified by tid does not refer to a detachable
thread.
[ESRCH] No thread could be found corresponding to the specified
thread id tid.
SEE ALSOpthreads(3), pthread_create(3), pthread_exit(3), pthread_join(3)STANDARDS
The pthread_detach function conforms to IEEE Std1003.1c (``POSIX'').
HISTORY
The pthread_detach function first appeared in BSD/OS 3.0.
4th Berkeley Distribution June 3, 1996 1