pthread_setcancelstate man page on OSF1

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

pthread_setcancelstate(3)			     pthread_setcancelstate(3)

NAME
       pthread_setcancelstate - Sets the calling thread's cancelability state

SYNOPSIS
       #include <pthread.h>

       int pthread_setcancelstate(
	       int state,
	       int *oldstate );

LIBRARY
       DECthreads POSIX 1003.1c Library (libpthread.so)

STANDARDS
       Interfaces  documented on this reference page conform to industry stan‐
       dards as follows:

       IEEE Std 1003.1c-1995, POSIX System Application Program Interface

PARAMETERS
       State of general cancelability to set for the calling thread. The  fol‐
       lowing	are   valid   cancel   state   values:	 PTHREAD_CANCEL_ENABLE
       PTHREAD_CANCEL_DISABLE Previous cancelability  state  for  the  calling
       thread.

DESCRIPTION
       This  routine sets the current thread's cancelability state and returns
       the calling thread's previous cancelability state in oldstate.

       When cancelability state is set to PTHREAD_CANCEL_DISABLE, a  cancella‐
       tion  request  cannot  be delivered to the thread, even if a cancelable
       routine is called or asynchronous cancelability type is enabled.

       When  a	thread	is  created,  the  default  cancelability   state   is
       PTHREAD_CANCEL_ENABLE.

   Possible Problems When Disabling Cancelability
       The most important use of thread cancellation is to ensure that indefi‐
       nite wait operations are terminated. For example, a thread  that	 waits
       on some network connection, which can possibly take days to respond (or
       might never respond), should be made cancelable.

       When a thread's cancelability is disabled, no routine in that thread is
       cancelable.  As	a  result,  the user is unable to cancel the operation
       performed by that thread. When disabling cancelability, be sure that no
       long waits can occur or that it is necessary for other reasons to defer
       cancellation requests around that particular region of code.

RETURN VALUES
       On successful completion, this routine  returns	the  calling  thread's
       previous	 cancelability state in the location specified by the oldstate
       argument.

       If an error condition occurs, this routine  returns  an	integer	 value
       indicating  the	type  of error. Possible return values are as follows:
       Successful  completion.	 The  specified	 state	is  not	  PTHREAD_CAN‐
       CEL_ENABLE or PTHREAD_CANCEL_DISABLE.

ERRORS
       None

SEE ALSO
       Functions:  pthread_cancel(3),  pthread_setcanceltype(3), pthread_test‐
       cancel(3)

       Manuals: Guide to DECthreads and Programmer's Guide

						     pthread_setcancelstate(3)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server OSF1

List of man pages available for OSF1

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