1PTHREAD_KILL_OTHER_THREADS_NLPi(n3u)x Programmer's MPaTnHuRaElAD_KILL_OTHER_THREADS_NP(3)
2
3
4
6 pthread_kill_other_threads_np - terminate all other threads in process
7
9 #include <pthread.h>
10
11 void pthread_kill_other_threads_np(void);
12
14 pthread_kill_other_threads_np() has an effect only in the LinuxThreads
15 threading implementation. On that implementation, calling this func‐
16 tion causes the immediate termination of all threads in the applica‐
17 tion, except the calling thread. The cancellation state and cancella‐
18 tion type of the to-be-terminated threads are ignored, and the cleanup
19 handlers are not called in those threads.
20
22 For an explanation of the terms used in this section, see at‐
23 tributes(7).
24
25 ┌────────────────────────────────────────────┬───────────────┬─────────┐
26 │Interface │ Attribute │ Value │
27 ├────────────────────────────────────────────┼───────────────┼─────────┤
28 │pthread_kill_other_threads_np() │ Thread safety │ MT-Safe │
29 └────────────────────────────────────────────┴───────────────┴─────────┘
30
32 This function is a nonstandard GNU extension; hence the suffix "_np"
33 (nonportable) in the name.
34
36 pthread_kill_other_threads_np() is intended to be called just before a
37 thread calls execve(2) or a similar function. This function is de‐
38 signed to address a limitation in the obsolete LinuxThreads implementa‐
39 tion whereby the other threads of an application are not automatically
40 terminated (as POSIX.1-2001 requires) during execve(2).
41
42 In the NPTL threading implementation, pthread_kill_other_threads_np()
43 exists, but does nothing. (Nothing needs to be done, because the im‐
44 plementation does the right thing during an execve(2).)
45
47 execve(2), pthread_cancel(3), pthread_setcancelstate(3), pthread_set‐
48 canceltype(3), pthreads(7)
49
51 This page is part of release 5.12 of the Linux man-pages project. A
52 description of the project, information about reporting bugs, and the
53 latest version of this page, can be found at
54 https://www.kernel.org/doc/man-pages/.
55
56
57
58Linux 2021-03-22 PTHREAD_KILL_OTHER_THREADS_NP(3)