I have a multithreaded application. One of my threads which perform a write() call is in a blocked state and can’t respond to any signals which I send to it.(The underlying resource manager is doing some busy operations and didn’t reply to its client. So my thread is blocked). To terminate that thread, I have called pthread_timedjoin() from its creator thread. When ETIMEDOUT occurs, I tried to call pthread_kill(SIGKILL) to the sub-thread which is already blocked. This solution worked for my scenario.
But what is happening actually? Is the whole process being terminated? Can SIGKILL be used with pthread_kill() to terminate the target thread alone?