Re: How to keep a thread from terminating
As far as I know it's not - I'm pretty sure the "system" threads like this are ones specifically marked as such in the kernel. Without patching the kernel there's no way that I know of to create such a process.
It'd help if you gave a few more specifics - what don't you want users closing, and why? The "normal" thing to do here would be to convert such a program into a service then stop non-privileged users from being able to stop services at all.
Save the whales, feed the hungry, free the mallocs.