Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pthread_detach(3T) — SunOS 5.6

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

pthread_create(3T)

pthread_join(3T)

attributes(5)

standards(5)

pthread_detach(3T)

NAME

pthread_detach − dynamically detaching a thread

SYNOPSIS

POSIX

cc [ flag ... ] file ... −lpthread [ library ... ]

#include <pthread.h>
int pthread_detach(pthread_t threadID);

DESCRIPTION

pthread_detach() can dynamically reset the detachstate attribute of a thread to PTHREAD_CREATE_DETACHED. For example, a thread could detach itself as follows:

pthread_detach(pthread_self());

RETURN VALUES

Upon successful completion, 0 is returned; otherwise, a non-zero value indicates an error. 

ERRORS

These functions fail and return the corresponding value, if any of the following conditions are detected:

EINVAL The value specified by threadID is not a joinable thread. 

ESRCH The value specified by threadID is not an existing thread ID. 

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
MT-Level MT-Safe

SEE ALSO

pthread_create(3T), pthread_join(3T), attributes(5), standards(5)

SunOS 5.6  —  Last change: 8 May 1997

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026