NAME pthread_cancel - send a cancelation request to a thread LIBRARY POSIX threads library ( libpthread ... lpthread ) SYNOPSIS #include int pthread_cancel(pthread_t thread ); DE…have one of the following values: PTHREAD_CANCEL_ENABLE The thread is cancelable. This ... will respond to a cancelation request. PTHREAD_CANCEL_DISABLE The thread is not cancelabl…have one of the following values: PTHREAD_CANCEL_ENABLE The thread is cancelable. This ... will respond to a cancelation request. PTHREAD_CANCEL_DISABLE The thread is not cancelabl…else { printf("Canceling thread\n"); s = pthread_cancel(thr); if (s != 0) handle_error ... pthread_cancel"); } s = pthread_join(thr, &res); if (s != 0) handle_error_en(s, "pthreadelse { printf("Canceling thread\n"); s = pthread_cancel(thr); if (s != 0) handle_error ... pthread_cancel"); } s = pthread_join(thr, &res); if (s != 0) handle_error_en(s, "pthreadreturn statement. • It is canceled (see pthread_cancel (3)). • Any of the threads ... getrlimit (2), pthread_attr_init (3), pthread_cancel (3), pthread_detach (3), pthread_equalcleanup_push(routine, arg); pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype); ... pthread_setcanceltype(oldtype, NULL); pthread ... names. HISTORY glibc 2.0 SEE ALSO pthrea…cleanup_push(routine, arg); pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype); ... pthread_setcanceltype(oldtype, NULL); pthread ... names. HISTORY glibc 2.0 SEE ALSO pthrea…pthread_cleanup_push (3). SEE ALSO pthread_cancel (3), pthread_cleanup_push (3), pthread_setcancelstatepthread_create (3). SEE ALSO pthread_cancel (3), pthread_create (3), pthread_detach (3), pthreadALSO pthread_attr_setdetachstate (3), pthread_cancel (3), pthread_create (3), pthread_exit (3), pthreadpthread_mutexattr_setkind_np (3), pthread_cancel (3). EXAMPLE A shared global variablepthread_mutexattr_setkind_np (3), pthread_cancel (3). EXAMPLE A shared global variablepthread_mutexattr_setkind_np (3), pthread_cancel (3). EXAMPLE A shared global variablepthread_mutexattr_setkind_np (3), pthread_cancel (3). EXAMPLE A shared global variablepthread_mutexattr_setkind_np (3), pthread_cancel (3). EXAMPLE A shared global variableexecve (2). SEE ALSO execve (2), pthread_cancel (3), pthread_setcancelstate (3), pthread_setcanceltype