It acts with threads like the kill subroutine with single-threaded processes. If the receiving thread has blocked delivery of the signal, the signal remains pending on the thread until the thread unblocks delivery of the signal or the action associated with the signal is set to ignore the signal. In this case, the flag is automatically set.
Parameters thread Specifies the target thread for the signal.
If the signal value is 0, error checking is performed, but no signal is delivered. Otherwise the function returns an error number. The value of the sig argument is an invalid or unsupported signal number.