]>
Commit | Line | Data |
---|---|---|
c67e8ae9 MK |
1 | .\" Copyright (c) 2009 Linux Foundation, written by Michael Kerrisk |
2 | .\" <mtk.manpages@gmail.com> | |
3 | .\" | |
5fbde956 | 4 | .\" SPDX-License-Identifier: Linux-man-pages-copyleft |
c67e8ae9 | 5 | .\" |
45186a5d | 6 | .TH PTHREAD_KILL_OTHER_THREADS_NP 3 2021-03-22 "Linux man-pages (unreleased)" |
c67e8ae9 MK |
7 | .SH NAME |
8 | pthread_kill_other_threads_np \- terminate all other threads in process | |
1be45b14 AC |
9 | .SH LIBRARY |
10 | POSIX threads library | |
8fc3b2cf | 11 | .RI ( libpthread ", " \-lpthread ) |
c67e8ae9 MK |
12 | .SH SYNOPSIS |
13 | .nf | |
14 | .B #include <pthread.h> | |
dbfe9c70 | 15 | .PP |
c67e8ae9 MK |
16 | .B void pthread_kill_other_threads_np(void); |
17 | .fi | |
18 | .SH DESCRIPTION | |
19 | .BR pthread_kill_other_threads_np () | |
33a0ccb2 | 20 | has an effect only in the LinuxThreads threading implementation. |
c67e8ae9 MK |
21 | On that implementation, |
22 | calling this function causes the immediate termination of | |
23 | all threads in the application, | |
24 | except the calling thread. | |
1f08fc80 | 25 | The cancelation state and cancelation type of the |
c67e8ae9 MK |
26 | to-be-terminated threads are ignored, |
27 | and the cleanup handlers are not called in those threads. | |
28 | .\" .SH VERSIONS | |
29 | .\" Available since glibc 2.0 | |
f1df713a | 30 | .SH ATTRIBUTES |
b3529074 PH |
31 | For an explanation of the terms used in this section, see |
32 | .BR attributes (7). | |
c466875e MK |
33 | .ad l |
34 | .nh | |
b3529074 PH |
35 | .TS |
36 | allbox; | |
c466875e | 37 | lbx lb lb |
b3529074 PH |
38 | l l l. |
39 | Interface Attribute Value | |
40 | T{ | |
f1df713a | 41 | .BR pthread_kill_other_threads_np () |
b3529074 PH |
42 | T} Thread safety MT-Safe |
43 | .TE | |
c466875e MK |
44 | .hy |
45 | .ad | |
46 | .sp 1 | |
3113c7f3 | 47 | .SH STANDARDS |
047cb380 | 48 | This function is a nonstandard GNU extension; |
0a96a9f0 | 49 | hence the suffix "_np" (nonportable) in the name. |
c67e8ae9 MK |
50 | .SH NOTES |
51 | .BR pthread_kill_other_threads_np () | |
52 | is intended to be called just before a thread calls | |
53 | .BR execve (2) | |
54 | or a similar function. | |
55 | This function is designed to address a limitation in the obsolete | |
56 | LinuxThreads implementation whereby the other threads of an application | |
57 | are not automatically terminated (as POSIX.1-2001 requires) during | |
58 | .BR execve (2). | |
847e0d88 | 59 | .PP |
c67e8ae9 MK |
60 | In the NPTL threading implementation, |
61 | .BR pthread_kill_other_threads_np () | |
62 | exists, but does nothing. | |
63 | (Nothing needs to be done, | |
64 | because the implementation does the right thing during an | |
65 | .BR execve (2).) | |
47297adb | 66 | .SH SEE ALSO |
c67e8ae9 | 67 | .BR execve (2), |
3e5c319e | 68 | .BR pthread_cancel (3), |
c67e8ae9 MK |
69 | .BR pthread_setcancelstate (3), |
70 | .BR pthread_setcanceltype (3), | |
c67e8ae9 | 71 | .BR pthreads (7) |