[Previous] [Contents] [Next]

pthread_kill()

Send a signal to a thread

Synopsis:

#include <signal.h>

int pthread_kill( pthread_t thread,
                  int sig );

Library:

libc

Description:

The pthread_kill() function sends the signal sig to the thread thread. The target thread and calling thread must be in the same process. If sig is zero, error checking is performed but no signal is sent.

Returns:

EOK
Success.
EAGAIN
Insufficient system resources are available to deliver the signal.
ESRCH
Invalid thread ID thread.
EINVAL
Invalid signal number sig.

Classification:

POSIX 1003.1 (Threads)

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

kill(), ThreadDestroy()


[Previous] [Contents] [Next]