1PTHREAD_KILL(3)            Linux Programmer's Manual           PTHREAD_KILL(3)
2
3
4

NAME

6       pthread_kill - send a signal to a thread
7

SYNOPSIS

9       #include <signal.h>
10
11       int pthread_kill(pthread_t thread, int sig);
12
13       Compile and link with -pthread.
14

DESCRIPTION

16       The  pthread_kill()  function  sends  the signal sig to thread, another
17       thread in the same process as the caller.  The signal is asynchronously
18       directed to thread.
19
20       If  sig  is 0, then no signal is sent, but error checking is still per‐
21       formed; this can be used to check for the existence of a thread ID.
22

RETURN VALUE

24       On success, pthread_kill() returns 0; on error,  it  returns  an  error
25       number, and no signal is sent.
26

ERRORS

28       ESRCH  No thread with the ID thread could be found.
29
30       EINVAL An invalid signal was specified.
31

CONFORMING TO

33       POSIX.1-2001.
34

NOTES

36       Signal dispositions are process-wide: if a signal handler is installed,
37       the handler will be invoked in the thread thread, but if  the  disposi‐
38       tion  of  the signal is "stop", "continue", or "terminate", this action
39       will affect the whole process.
40

SEE ALSO

42       kill(2)  sigaction(2),  sigpending(2),  pthread_self(3),   pthread_sig‐
43       mask(3), raise(3), pthreads(7), signal(7)
44

COLOPHON

46       This  page  is  part of release 3.25 of the Linux man-pages project.  A
47       description of the project, and information about reporting  bugs,  can
48       be found at http://www.kernel.org/doc/man-pages/.
49
50
51
52Linux                             2009-01-28                   PTHREAD_KILL(3)
Impressum