in reply to Re^2: How do I kill a process tree in Windows
in thread How do I kill a process tree in Windows

Hi,

If you spawn the processes yourself from within a perl script you should use Win32::Job . This will give you job control and thus the ability to kill a group of process.

As i understand it, this is the way to control processes in Windows, that is killing a processes and all itīs sons.

I find dealing with PID and PPIDS is kind of not adapted since PIDs numbers are recycled fastly and you could kill something else !

In "real" windows programing there may be something like a "process handle" that you get when you create a process and that allow fine control, but within Perl Win32::Job seems the way to go ...

ZlR.

  • Comment on Re^3: How do I kill a process tree in Windows

Replies are listed 'Best First'.
Re^4: How do I kill a process tree in Windows
by DrWhy (Chaplain) on Aug 19, 2005 at 17:00 UTC
    This looks great, except the processes I'm trying to kill are started from within another module (Test::Harness). In order to use this I would have to modify Test::Harness, which is just not going to happen... I'll look into taskkill mentioned by the anonymous monk above.

    --DrWhy

    "If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."