OSDN Git Service

effa9769973cd904f67fc91e9b688dd9355cec56
[linuxjm/LDP_man-pages.git] / original / man3 / pthread_kill_other_threads_np.3
1 .\" Copyright (c) 2009 Linux Foundation, written by Michael Kerrisk
2 .\"     <mtk.manpages@gmail.com>
3 .\"
4 .\" %%%LICENSE_START(VERBATIM)
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\" %%%LICENSE_END
25 .\"
26 .TH PTHREAD_KILL_OTHER_THREADS_NP 3 2010-09-09 "Linux" "Linux Programmer's Manual"
27 .SH NAME
28 pthread_kill_other_threads_np \- terminate all other threads in process
29 .SH SYNOPSIS
30 .nf
31 .B #include <pthread.h>
32
33 .B void pthread_kill_other_threads_np(void);
34 .fi
35 .SH DESCRIPTION
36 .BR pthread_kill_other_threads_np ()
37 has an effect only in the LinuxThreads threading implementation.
38 On that implementation,
39 calling this function causes the immediate termination of
40 all threads in the application,
41 except the calling thread.
42 The cancellation state and cancellation type of the
43 to-be-terminated threads are ignored,
44 and the cleanup handlers are not called in those threads.
45 .\" .SH VERSIONS
46 .\" Available since glibc 2.0
47 .SH CONFORMING TO
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
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)
72 .SH COLOPHON
73 This page is part of release 3.64 of the Linux
74 .I man-pages
75 project.
76 A description of the project,
77 and information about reporting bugs,
78 can be found at
79 \%http://www.kernel.org/doc/man\-pages/.