pthread_attr_setdetachstate man page on NetBSD

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

PTHREAD_ATTR_GETDETAC... BSD Library Functions Manual PTHREAD_ATTR_GETDETAC...

NAME
     pthread_attr_getdetachstate — get and set the “detach state” attribute

LIBRARY
     POSIX Threads Library (libpthread, -lpthread)

SYNOPSIS
     #include <pthread.h>

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

     int
     pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate);

DESCRIPTION
     The attribute parameters for the pthread_attr_getdetachstate() and
     pthread_attr_setdetachstate() functions are mutually exclusive and must
     be one of:

       PTHREAD_CREATE_JOINABLE	The threads must explicitly be waited for
				using the pthread_join(3) function once they
				exit for their status to be received and their
				resources to be freed.	This is the default.

       PTHREAD_CREATE_DETACHED	The thread's resources will automatically be
				freed once the thread exits, and the thread
				will not be joined.

     If the thread is created as detached, it is an error to use the thread ID
     with pthread_detach(3) or pthread_join(3).

RETURN VALUES
     If successful, these functions return 0.  Otherwise, an error number is
     returned to indicate the error.

ERRORS
     No errors are defined for pthread_attr_getdetachstate().

     The pthread_attr_setdetachstate() function should fail if:

     [EINVAL]		The value specified by detachstate is invalid.

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

STANDARDS
     Both functions conform to IEEE Std 1003.1-2001 (“POSIX.1”).

BSD				 July 9, 2010				   BSD
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server NetBSD

List of man pages available for NetBSD

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