Just a general question for the unix readers out there...

Can anyone think of an easy way to effectively kill straggling processes? For some of our automated builds, we use a system to distribute to remote agents. Some of that work involves starting up Geronimo, and other servers. Sometimes those servers don't stop properly, which messes up future execution of jobs sent to that agent.

I'm trying to figure out a simple way, to allow those future executions to have a better chance of success by making sure there are no straggling processes left behind. Idea is also to just kill the children processes of the agent, but not anything else (like a su, or ssh for that user).

Any sh-hackers out there know how to just get the list of a processes children (and children's children)... list as pids of course, so I can kill -9 them.

My brain is fried... can't think of an easy way to do this... if anyone knows, please drop some knowledge :-)

Thanks,

--jason

Reply via email to