|
|
HP-UX Reference > Ppthread_detach(3T)Pthread LibraryHP-UX 11i Version 2: December 2007 Update |
|
NAMEpthread_detach() — mark a thread as detached to reclaim its resources when it terminates DESCRIPTIONpthread_detach() is used to detach the thread thread. When thread terminates, its resources will automatically be reclaimed by the system. If thread has already terminated, pthread_detach() causes the resources of thread to be reclaimed by the system. pthread_detach() does not cause thread to terminate. Once a detached thread has terminated, its resources, including the thread ID, may be reused by the system. The return status of a detached thread is lost when the thread terminates. Calling this function multiple times for the same thread results in undefined behavior. RETURN VALUEUpon successful completion, pthread_detach() returns zero. Otherwise, an error number is returned to indicate the error (the errno variable is not set). |
|