Forum OpenACS Q&A: How to kill Thread

Collapse
Posted by Deborah winny on
We create a thread in user mode for reading. Its a device driver program, where we have thread in kernel mode for blue tooth stack. the close_filedesctiptor (in user mode )is not invoking close in tty and also the thread created by application unable to kill. while killing the thread , it hangs the system and forced to reboot. how to overcome this problem.
Collapse
2: Re: How to kill Thread (response to 1)
Posted by Andrew Piskorski on
Do you even have any idea what Forum you're posting to? Your question doesn't have anything even vaguely to do with OpenACS or even web/db in general.

As for your question itself, basically, RTFM.

For POSIX threads there is generally no way to forcibly kill a thread. If you want a thread to die, you must arrange for the thread to stop what's it's doing and exit on its own. Various unix Non-POSIX thread APIs do sometimes provide a forcible kill function. On MS Windows, I've no idea.

Collapse
3: Re: How to kill Thread (response to 2)
Posted by Vinod Kurup on
I thought this was how to kill a thread. Or, my favorite, Talli's approach.