pthread_kill() returns zero after completing successfully. Any other return value indicates that an error occurred. When either of the following conditions occurs, pthread_kill() fails and returns the corresponding value.
EINVAL
Description:sig is not a valid signal number.
ESRCH
Description:tid cannot be found in the current process.