nonblock mode로 read 중인 thread를 pthread_kill을 이용하여 죽일 수 있나요.

kmdigit의 이미지

질문 그대로

thread1 {
ret = read(); <- nonblock mode read
if (ret != sizeof(xx)) {
release();
}
}

이런 구조의 thread1이 있는데,
이 thread1을 pthread_kill()로 죽이려고 합니다.
그런데 여전히 thread는 잘 살아 있는거 같더라구요.

혹시 다른 thread에서 pthread_kill을 이용하여 read중인 thread를 깔끔히 종료할 수 있는 방법
아시는 분 알려주세요 :)

아니면 read의 return 값이 -1로 들어와도 괜찮을 듯 싶구요!!

모두 즐거운 주말 보내세요~~!