tzfile.5, tzselect.8: sync from tzdb upstream
[man-pages.git] / man3 / pthread_kill_other_threads_np.3
blobac7650505dee27c01008ed5a16ad6b7afaaa9de0
1 '\" t
2 .\" Copyright (c) 2009 Linux Foundation, written by Michael Kerrisk
3 .\"     <mtk.manpages@gmail.com>
4 .\"
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\"
7 .TH pthread_kill_other_threads_np 3 (date) "Linux man-pages (unreleased)"
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 .PP
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 VERSIONS
30 .\" Available since glibc 2.0
31 .SH ATTRIBUTES
32 For an explanation of the terms used in this section, see
33 .BR attributes (7).
34 .ad l
35 .nh
36 .TS
37 allbox;
38 lbx lb lb
39 l l l.
40 Interface       Attribute       Value
42 .BR pthread_kill_other_threads_np ()
43 T}      Thread safety   MT-Safe
44 .TE
45 .hy
46 .ad
47 .sp 1
48 .SH STANDARDS
49 This function is a nonstandard GNU extension;
50 hence the suffix "_np" (nonportable) in the name.
51 .SH NOTES
52 .BR pthread_kill_other_threads_np ()
53 is intended to be called just before a thread calls
54 .BR execve (2)
55 or a similar function.
56 This function is designed to address a limitation in the obsolete
57 LinuxThreads implementation whereby the other threads of an application
58 are not automatically terminated (as POSIX.1-2001 requires) during
59 .BR execve (2).
60 .PP
61 In the NPTL threading implementation,
62 .BR pthread_kill_other_threads_np ()
63 exists, but does nothing.
64 (Nothing needs to be done,
65 because the implementation does the right thing during an
66 .BR execve (2).)
67 .SH SEE ALSO
68 .BR execve (2),
69 .BR pthread_cancel (3),
70 .BR pthread_setcancelstate (3),
71 .BR pthread_setcanceltype (3),
72 .BR pthreads (7)