in reply to Re^2: Killing on Windows
in thread Killing on Windows

What possibilities exist in Windows to kill a process *including* all of its children in one go?

See Win32::Job.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP PCW It is as I've been saying!(Audio until 20090817)

Replies are listed 'Best First'.
Re^4: Killing on Windows
by rovf (Priest) on Sep 10, 2009 at 10:52 UTC

    Yes, this is a possibility indeed. I just was curious whether there is a possibility to kill jobs started with system(1,...); sorry if I was not clear enough in this respect.

    It turns out that at least with my tests, I did find a solution which seems to work: Using a negative kill signal (kill -9) killed also my children. Knowing that Windows gets funny at times, I wonder whether this is indeed a reliable solution, or whether there could be cases when this strategy fails to work.
    -- 
    Ronald Fischer <ynnor@mm.st>
      Using a negative kill signal (kill -9) killed also my children

      Hm. Which version of Perl are you using?

      Update: I'm not sure when it was added, but the latest sources show that any negative signal value is now taken to mean "kill this process tree with prejuduce".


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        Which version of Perl are you using?

        5.8.8

        How do I have to understand "with prejudice" here? That all children are killed without any mercy? This would indeed be what I would need for my application...
        -- 
        Ronald Fischer <ynnor@mm.st>