Cancels the specified thread.
Threads Library (libpthreads.a)
The pthread_signal_to_cancel_np subroutine cancels the target thread thread by creating a handler thread. The handler thread calls the sigwait subroutine with the sigset parameter, and cancels the target thread when the sigwait subroutine returns. Successive calls to this subroutine override the previous ones.
This subroutine is not POSIX compliant and is provided only for compatibility with DCE threads. It should not be used when writing new applications.
Item | Description |
---|---|
sigset | Specifies the set of signals to wait on. |
thread | Specifies the thread to cancel. |
Upon successful completion, 0 is returned. Otherwise, an error code is returned.
The pthread_signal_to_cancel_np subroutine is unsuccessful if the following is true:
Item | Description |
---|---|
EAGAIN | The handler thread cannot be created. |
EINVAL | The sigset or thread parameters are not valid. |