1 .\" Copyright (c) 2009 Linux Foundation, written by Michael Kerrisk
2 .\" <mtk.manpages@gmail.com>
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .TH PTHREAD_KILL_OTHER_THREADS_NP 3 2021-03-22 "Linux man-pages (unreleased)"
8 pthread_kill_other_threads_np \- terminate all other threads in process
11 .RI ( libpthread ", " \-lpthread )
14 .B #include <pthread.h>
16 .B void pthread_kill_other_threads_np(void);
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.
29 .\" Available since glibc 2.0
31 For an explanation of the terms used in this section, see
39 Interface Attribute Value
41 .BR pthread_kill_other_threads_np ()
42 T} Thread safety MT-Safe
48 This function is a nonstandard GNU extension;
49 hence the suffix "_np" (nonportable) in the name.
51 .BR pthread_kill_other_threads_np ()
52 is intended to be called just before a thread calls
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
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
68 .BR pthread_cancel (3),
69 .BR pthread_setcancelstate (3),
70 .BR pthread_setcanceltype (3),