HP-UX Reference (11i v3 07/02) - 3 Library Functions N-Z (vol 7)

p
pthread_kill(3T) pthread_kill(3T)
(Pthread Library)
NAME
pthread_kill() - send a signal to a thread
SYNOPSIS
#include <signal.h>
int pthread_kill(
pthread_t thread,
int sig
);
PARAMETERS
thread Thread to which the signal is to be delivered.
sig Signal to be delivered to thread.
DESCRIPTION
The
pthread_kill()
function is used to request that a signal be delivered to thread. The signal is
asynchronously directed to thread in the calling process. The signal is handled in the context of the given
thread; if the signal action results in the thread terminating or stopping, this action is applied to the whole
process.
If sig is zero, error checking is performed but a signal is not sent.
RETURN VALUE
Upon successful completion,
pthread_kill()
returns zero. Otherwise, an error number is returned to
indicate the error (the
errno variable is not set).
ERRORS
If any of the following occur, the pthread_kill()
function returns the corresponding error number:
[EINVAL] sig is an invalid or unsupported signal number.
[ESRCH] No thread could be found corresponding to thread.
AUTHOR
pthread_kill() was derived from the IEEE POSIX P1003.1c standard.
SEE ALSO
kill(2), sigaction(2), pthread_self(3T), raise(2).
STANDARDS CONFORMANCE
pthread_kill(): POSIX 1003.1c.
HP-UX 11i Version 3: February 2007 1 Hewlett-Packard Company 205