Re: Killing a process tree?



On 07 Mar 2006 03:23:17 GMT, x0054 wrote:
Bit Twister <BitTwister@xxxxxxxxxxxxxxxx> wrote in

Well, you could use ps to get process and parent process pid,
match subprocess to parent process, and kill in reverse order.


Right... I was hoping there would be an easier way. Isn't there a program
that does that :(

Not that I am aware of without using

--------- standard search tip follows ---------------------

Please bookmark the following, very large,
Frequently Asked Questions (faq) Search engine:

http://groups.google.com/advanced_group_search
key word(s) in the first box
*linux* in Newsgroup box. You need to use the two
asterisks around linux, pick English

If you want/need more control over the first box search,
http://www.google.com/help/refinesearch.html

--------- end of standard search tip --------------------------

to see if someone provided one.

You would think a ps piped into sort would give the parent/subprocess
tree you would travel in a loop. Output processes to kill into a file
for reverse sorting by subprocess and start killing the new sort results.
This assumes, process ids have not rolled over. :)

Once you get it working, you could post it with something like
Subject: Killing a process tree (SOLUTION)

For someone to find with a search engine. :)

.



Relevant Pages

  • Re: Killing a process tree? - 1 attachment
    ... Well, you could use ps to get process and parent process pid, ... match subprocess to parent process, and kill in reverse order. ...
    (alt.os.linux)
  • Re: recursively kill the childs of a process
    ... >>> of this childs don't die so the parent process either. ... >> Just send a signal to the process group, ... If it's not a process group leader, then you won't kill any processes, ...
    (comp.unix.shell)
  • Re: Create Thread problem
    ... what you are proposing isn't doable for user mode. ... debugger in its own process if you must kill the parent process. ... That's why i want to change the parent process for the thread or make ...
    (microsoft.public.win32.programmer.kernel)
  • Re: open office freeze
    ... > trick to killing a run away process like open office. ... > kill -9 it to no avail and killing its parent process only makes it ... There must be some way to kill a process ... if you do get a process stuck which won't go away when you ...
    (freebsd-questions)