Debian Codegraph @

upstream/debian-unstable/man3/pthread_kill_other_threads_np.3

raw
1 '\" t
2 .\" Copyright, the authors of the Linux man-pages project
3 .\"
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\"
6 .TH pthread_kill_other_threads_np 3 2025-05-17 "Linux man-pages 6.18"
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 .P
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 ATTRIBUTES
29 For an explanation of the terms used in this section, see
30 .BR attributes (7).
31 .TS
32 allbox;
33 lbx lb lb
34 l l l.
35 Interface Attribute Value
36 T{
37 .na
38 .nh
39 .BR pthread_kill_other_threads_np ()
40 T} Thread safety MT-Safe
41 .TE
42 .SH VERSIONS
43 In the NPTL threading implementation,
44 .BR pthread_kill_other_threads_np ()
45 exists, but does nothing.
46 (Nothing needs to be done,
47 because the implementation does the right thing during an
48 .BR execve (2).)
49 .SH STANDARDS
50 GNU;
51 hence the suffix "_np" (nonportable) in the name.
52 .SH HISTORY
53 glibc 2.0
54 .SH NOTES
55 .BR pthread_kill_other_threads_np ()
56 is intended to be called just before a thread calls
57 .BR execve (2)
58 or a similar function.
59 This function is designed to address a limitation in the obsolete
60 LinuxThreads implementation whereby the other threads of an application
61 are not automatically terminated (as POSIX.1-2001 requires) during
62 .BR execve (2).
63 .SH SEE ALSO
64 .BR execve (2),
65 .BR pthread_cancel (3),
66 .BR pthread_setcancelstate (3),
67 .BR pthread_setcanceltype (3),
68 .BR pthreads (7)