PTHREAD_KILL(3) Library Functions Manual PTHREAD_KILL(3)

pthread_killsend a signal to a thread

#include <signal.h>

int pthread_kill(pthread_t thread, int sig);

The pthread_kill() function is used to request that a signal be delivered to the specified thread.

As in , if is zero, error checking is performed but no signal is actually sent.

Upon successful completion, the function returns a value of zero. Otherwise the function returns an error number. If the pthread_kill() function fails, no signal is sent.

The pthread_kill() function will fail if:

No thread could be found corresponding to that specified by the given thread ID.
The value of the sig argument is an invalid or unsupported signal number.

The function will not return an error code of [EINTR].

None.

None.

None.

kill(3) , pthread_self(3) , raise(3) , <signal.h> .

Derived from the POSIX Threads Extension (1003.1c-1995)

February 1997 posix.fail