]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/pthread_kill_other_threads_np.3
All pages: Remove the 5th argument to .TH
[thirdparty/man-pages.git] / man3 / pthread_kill_other_threads_np.3
1 .\" Copyright (c) 2009 Linux Foundation, written by Michael Kerrisk
2 .\" <mtk.manpages@gmail.com>
3 .\"
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\"
6 .TH PTHREAD_KILL_OTHER_THREADS_NP 3 2021-03-22 "Linux man-pages (unreleased)"
7 .SH NAME
8 pthread_kill_other_threads_np \- terminate all other threads in process
9 .SH LIBRARY
10 POSIX threads library
11 .RI ( libpthread ", " \-lpthread )
12 .SH SYNOPSIS
13 .nf
14 .B #include <pthread.h>
15 .PP
16 .B void pthread_kill_other_threads_np(void);
17 .fi
18 .SH DESCRIPTION
19 .BR pthread_kill_other_threads_np ()
20 has an effect only in the LinuxThreads threading implementation.
21 On that implementation,
22 calling this function causes the immediate termination of
23 all threads in the application,
24 except the calling thread.
25 The cancelation state and cancelation type of the
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
30 .SH ATTRIBUTES
31 For an explanation of the terms used in this section, see
32 .BR attributes (7).
33 .ad l
34 .nh
35 .TS
36 allbox;
37 lbx lb lb
38 l l l.
39 Interface Attribute Value
40 T{
41 .BR pthread_kill_other_threads_np ()
42 T} Thread safety MT-Safe
43 .TE
44 .hy
45 .ad
46 .sp 1
47 .SH STANDARDS
48 This function is a nonstandard GNU extension;
49 hence the suffix "_np" (nonportable) in the name.
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).
59 .PP
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).)
66 .SH SEE ALSO
67 .BR execve (2),
68 .BR pthread_cancel (3),
69 .BR pthread_setcancelstate (3),
70 .BR pthread_setcanceltype (3),
71 .BR pthreads (7)