<disclaimer>I did not write this and have no clue how it works :)</disclaimer>

We faced a similar situation in gump:
http://issues.apache.org/jira/browse/GUMP-35

Leo Simons wrote this piece of code:
http://svn.apache.org/viewvc/gump/branches/Gump3/pygump/python/gump/util/executor.py?view=markup

thanks,
dims

On 2/15/07, Jason Dillon <[EMAIL PROTECTED]> wrote:
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



--
Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers

Reply via email to