pthread_attr_getdetachstate man page on BSDi

Man page or keyword search:  
man Server   6284 pages
apropos Keyword Search (all sections)
Output format
BSDi logo
[printable version]

PTHREAD_ATTR_DETACHSTATE(3) BSD Programmer's ManualPTHREAD_ATTR_DETACHSTATE(3)

NAME
     pthread_attr_getdetachstate, pthread_attr_setdetachstate - pthread de-
     tachstate creation attribute

SYNOPSIS
     #include <pthread.h>

     int
     pthread_attr_getdetachstate(pthread_attr_t *attr, int *detachstate);

     int
     pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate);

DESCRIPTION
     This interface is defined by IEEE Std1003.1c (``POSIX'').

     The pthread_attr_getdetachstate() and pthread_attr_setdetachstate() func-
     tions retrieve and establish the detach state in the pthread creation at-
     tribute pointed to by attr. The detachstate should be specified as one of
     PTHREAD_CREATE_DETACHED or PTHREAD_CREATE_JOINABLE. The default value for
     detachstate in an attribute object is PTHREAD_CREATE_JOINABLE.

     Specifying PTHREAD_CREATE_DETACHED causes all threads created with the
     creation attribute attr to be created in the detached state.  If a thread
     is created detached, then specifying the thread in a call to
     pthread_detach() or pthread_join() is an error.

     Specifying PTHREAD_CREATE_JOINABLE causes all threads created with the
     creation attribute attr to be created in the joinable state.

RETURN VALUES
     Upon successful completion, the pthread_attr_getdetachstate and
     pthread_attr_setdetachstate functions return 0. Otherwise a non-zero er-
     ror code is returned.

ERRORS
     On an error the pthread_attr_getdetachstate and
     pthread_attr_setdetachstate functions will return:

     [EINVAL]	   The value of a function argument is invalid.

SEE ALSO
     pthreads(3),  pthread_create(3),  pthread_join(3),	 pthread_detach(3),
     pthread_attr(3)

STANDARDS
     The pthread_attr_getdetachstate and pthread_attr_setdetachstate functions
     conform to IEEE Std1003.1c (``POSIX'').

HISTORY
     The pthread_attr_getdetachstate and pthread_attr_setdetachstate functions
     first appeared in BSD/OS 3.0.

4th Berkeley Distribution	 June 3, 1996				     1
[top]

List of man pages available for BSDi

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net