pthread_cancel(3P) pthread_cancel(3P)
pthread_cancel - request cancellation of a thread
#include <pthread.h>
int pthread_cancel(pthread_t thread);
The pthread_cancel() function requests that the thread identified by
thread be cancelled. Cancellation state [see pthread_setcancelstate()]
and type [see pthread_setcanceltype()] determine whether the request is
acted upon immediately or at some time in the future; pthread_cancel()
does not wait, it merely issues the request. When thread does act on the
request, it will terminate as if it had called pthread_exit() with a
return status of PTHREAD_CANCELED.
On success pthread_cancel() returns zero; otherwise an error number is
returned:
[ESRCH] The thread parameter does not identify a thread.
pthread_setcancelstate(3P), pthread_setcanceltype(3P), pthread_exit(3P).
PPPPaaaaggggeeee 1111 [ Back ]
|