1pthread_kill_other_threads_nLpi(b3r)ary Functions Mapntuharlead_kill_other_threads_np(3)
2
3
4

NAME

6       pthread_kill_other_threads_np - terminate all other threads in process
7

LIBRARY

9       POSIX threads library (libpthread, -lpthread)
10

SYNOPSIS

12       #include <pthread.h>
13
14       void pthread_kill_other_threads_np(void);
15

DESCRIPTION

17       pthread_kill_other_threads_np()  has an effect only in the LinuxThreads
18       threading implementation.  On that implementation, calling  this  func‐
19       tion  causes  the  immediate termination of all threads in the applica‐
20       tion, except the calling thread.  The cancelation state and cancelation
21       type  of the to-be-terminated threads are ignored, and the cleanup han‐
22       dlers are not called in those threads.
23

ATTRIBUTES

25       For an  explanation  of  the  terms  used  in  this  section,  see  at‐
26       tributes(7).
27
28       ┌────────────────────────────────────────────┬───────────────┬─────────┐
29Interface                                   Attribute     Value   
30       ├────────────────────────────────────────────┼───────────────┼─────────┤
31pthread_kill_other_threads_np()             │ Thread safety │ MT-Safe │
32       └────────────────────────────────────────────┴───────────────┴─────────┘
33

VERSIONS

35       In  the  NPTL threading implementation, pthread_kill_other_threads_np()
36       exists, but does nothing.  (Nothing needs to be done, because  the  im‐
37       plementation does the right thing during an execve(2).)
38

STANDARDS

40       GNU; hence the suffix "_np" (nonportable) in the name.
41

HISTORY

43       glibc 2.0
44

NOTES

46       pthread_kill_other_threads_np()  is intended to be called just before a
47       thread calls execve(2) or a similar function.   This  function  is  de‐
48       signed to address a limitation in the obsolete LinuxThreads implementa‐
49       tion whereby the other threads of an application are not  automatically
50       terminated (as POSIX.1-2001 requires) during execve(2).
51

SEE ALSO

53       execve(2),  pthread_cancel(3),  pthread_setcancelstate(3), pthread_set‐
54       canceltype(3), pthreads(7)
55
56
57
58Linux man-pages 6.04              2023-03-30  pthread_kill_other_threads_np(3)
Impressum