There are several methods of inter-thread communication, including named pipes and shared memory. But what you want here I suspect is a signal (see the signal manpage for more).
You can find out the status of another process by examining the /proc/PID directory, and by function calls. I don't know how to do this but you may want to look at the source code for “top” to get some ideas.
If the child thread gets killed, it will die in the middle of whatever it's doing. What happens then depends on several factors, including how you killed it.
|