Debian Codegraph @

upstream/debian-trixie/man3/pthread_kill_other_threads_np.3

raw
1 '\" t
2 .\" Copyright (c) 2009 Linux Foundation, written by Michael Kerrisk
3 .\" <[email protected]>
4 .\"
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\"
7 .TH pthread_kill_other_threads_np 3 2024-05-02 "Linux man-pages 6.9.1"
8 .SH NAME
9 pthread_kill_other_threads_np \- terminate all other threads in process
10 .SH LIBRARY
11 POSIX threads library
12 .RI ( libpthread ", " \-lpthread )
13 .SH SYNOPSIS
14 .nf
15 .B #include <pthread.h>
16 .P
17 .B void pthread_kill_other_threads_np(void);
18 .fi
19 .SH DESCRIPTION
20 .BR pthread_kill_other_threads_np ()
21 has an effect only in the LinuxThreads threading implementation.
22 On that implementation,
23 calling this function causes the immediate termination of
24 all threads in the application,
25 except the calling thread.
26 The cancelation state and cancelation type of the
27 to-be-terminated threads are ignored,
28 and the cleanup handlers are not called in those threads.
29 .SH ATTRIBUTES
30 For an explanation of the terms used in this section, see
31 .BR attributes (7).
32 .TS
33 allbox;
34 lbx lb lb
35 l l l.
36 Interface Attribute Value
37 T{
38 .na
39 .nh
40 .BR pthread_kill_other_threads_np ()
41 T} Thread safety MT-Safe
42 .TE
43 .SH VERSIONS
44 In the NPTL threading implementation,
45 .BR pthread_kill_other_threads_np ()
46 exists, but does nothing.
47 (Nothing needs to be done,
48 because the implementation does the right thing during an
49 .BR execve (2).)
50 .SH STANDARDS
51 GNU;
52 hence the suffix "_np" (nonportable) in the name.
53 .SH HISTORY
54 glibc 2.0
55 .SH NOTES
56 .BR pthread_kill_other_threads_np ()
57 is intended to be called just before a thread calls
58 .BR execve (2)
59 or a similar function.
60 This function is designed to address a limitation in the obsolete
61 LinuxThreads implementation whereby the other threads of an application
62 are not automatically terminated (as POSIX.1-2001 requires) during
63 .BR execve (2).
64 .SH SEE ALSO
65 .BR execve (2),
66 .BR pthread_cancel (3),
67 .BR pthread_setcancelstate (3),
68 .BR pthread_setcanceltype (3),
69 .BR pthreads (7)