I have a problem with pthreads using ANSI C over Linux.
I want to get commands using a thread, so it is waiting for them. But, in a certain case, I need to kill it.
If I use pthread_kill(), it sends a signal and kills the whole process. And, if I am on the right way, pthread_cancel requires the thread to be prepared for it.
Is there any cleaner or more simple way to kill a thread from another one?
Thanks.