pthread_kill_other_threads_np.man

来自「linux 下的线程库源码」· MAN 代码 · 共 41 行

MAN
41
字号
.TH PTHREAD_KILL_OTHER_THREADS_NP 3 LinuxThreads.SH NAMEpthread_kill_other_threads_np \- terminate all threads in program except calling thread.SH SYNOPSIS#include <pthread.h>void pthread_kill_other_threads_np(void);.SH DESCRIPTION!pthread_kill_other_threads_np! is a non-portable LinuxThreads extension.It causes all threads in the program to terminate immediately, exceptthe calling thread which proceeds normally. It is intended to becalled just before a thread calls one of the !exec! functions,e.g. !execve!(2).Termination of the other threads is not performed through!pthread_cancel!(3) and completely bypasses the cancellationmechanism. Hence, the current settings for cancellation state andcancellation type are ignored, and the cleanup handlers are notexecuted in the terminated threads..SH AUTHORXavier Leroy <Xavier.Leroy@inria.fr>.SH "SEE ALSO"!execve!(2),!pthread_setcancelstate!(3),!pthread_setcanceltype!(3),!pthread_cancel!(3)..SH BUGSAccording to POSIX 1003.1c, a successful !exec*! in one of the threadsshould terminate automatically all other threads in the program.This behavior is not yet implemented in LinuxThreads.Calling !pthread_kill_other_threads_np! before !exec*! achieves muchof the same behavior, except that if !exec*! ultimately fails, thenall other threads are already killed.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?