Unix and Linux Discussions Tagged with threads |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
10 |
18,047 |
What is on Your Mind? |
|
|
|
7 |
12,298 |
What is on Your Mind? |
|
|
|
1 |
11,737 |
Post Here to Contact Site Administrators and Moderators |
|
|
|
11 |
14,612 |
Post Here to Contact Site Administrators and Moderators |
|
|
|
21 |
8,810 |
What is on Your Mind? |
|
|
|
1 |
1,073 |
UNIX for Beginners Questions & Answers |
|
|
|
0 |
1,969 |
Post Here to Contact Site Administrators and Moderators |
|
|
|
1 |
3,842 |
Programming |
|
|
|
3 |
6,261 |
Shell Programming and Scripting |
|
|
|
1 |
307,680 |
UNIX for Beginners Questions & Answers |
|
|
|
5 |
2,609 |
UNIX for Advanced & Expert Users |
|
|
|
0 |
3,045 |
Shell Programming and Scripting |
|
|
|
1 |
2,783 |
Programming |
|
|
|
4 |
2,403 |
Programming |
|
|
|
3 |
8,808 |
Programming |
|
|
|
1 |
2,951 |
Programming |
|
|
|
2 |
3,913 |
HP-UX |
|
|
|
5 |
6,766 |
Shell Programming and Scripting |
|
|
|
0 |
3,559 |
OS X OpenSource RSS |
|
|
|
1 |
3,133 |
Programming |
|
|
|
2 |
3,745 |
Programming |
|
|
|
0 |
1,553 |
Software Releases - RSS News |
|
|
|
0 |
2,843 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
46,045 |
UNIX for Advanced & Expert Users |
|
|
|
7 |
6,347 |
Programming |
|
|
|
3 |
7,208 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
2,666 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
2,249 |
Post Here to Contact Site Administrators and Moderators |
|
|
|
2 |
10,238 |
Programming |
|
|
|
1 |
5,971 |
Programming |
|
|
|
0 |
4,513 |
Forum Support Area for Unregistered Users & Account Problems |
|
|
|
0 |
3,537 |
Linux |
|
|
|
5 |
14,213 |
Shell Programming and Scripting |
|
|
|
6 |
4,203 |
UNIX for Advanced & Expert Users |
|
|
|
0 |
3,759 |
Linux |
|
|
|
2 |
9,138 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
2,697 |
Post Here to Contact Site Administrators and Moderators |
|
|
|
1 |
2,496 |
Post Here to Contact Site Administrators and Moderators |
|
|
|
0 |
2,881 |
Forum Support Area for Unregistered Users & Account Problems |
|
|
|
0 |
7,852 |
Linux |
PTHREAD_KILL_OTHER_THREADS_NP(3) Library Functions Manual PTHREAD_KILL_OTHER_THREADS_NP(3)
NAME
pthread_kill_other_threads_np - terminate all threads in program except calling thread
SYNOPSIS
#include <pthread.h>
void pthread_kill_other_threads_np(void);
DESCRIPTION
pthread_kill_other_threads_np is a non-portable LinuxThreads extension. It causes all threads in the program to terminate immediately,
except the calling thread which proceeds normally. It is intended to be called just before a thread calls one of the exec functions, e.g.
execve(2).
Termination of the other threads is not performed through pthread_cancel(3) and completely bypasses the cancellation mechanism. Hence, the
current settings for cancellation state and cancellation type are ignored, and the cleanup handlers are not executed in the terminated
threads.
AUTHOR
Xavier Leroy <Xavier.Leroy@inria.fr>
SEE ALSO
execve(2), pthread_setcancelstate(3), pthread_setcanceltype(3), pthread_cancel(3).
BUGS
According to POSIX 1003.1c, a successful exec* in one of the threads should terminate automatically all other threads in the program. This
behavior is not yet implemented in LinuxThreads. Calling pthread_kill_other_threads_np before exec* achieves much of the same behavior,
except that if exec* ultimately fails, then all other threads are already killed.
LinuxThreads PTHREAD_KILL_OTHER_THREADS_NP(3)