in reply to Kill a process in Perl

If you are launching the process within the script then you can use Win32::Process to launch and manage the script. You don't need any threading or forking to support that.


True laziness is hard work

Replies are listed 'Best First'.
Re^2: Kill a process in Perl
by syphilis (Archbishop) on Jul 11, 2009 at 06:26 UTC
    In fact, if you have the pid of the process that you want to kill, you can kill it with Win32::Process::KillProcess($pid, $exitcode), irrespcective of how the process was started.

    Cheers,
    Rob

      True, but finding the pid for a process is a right pita! Every time I want to do it (about 11 months apart on average) it seems to take an hour of trawling through MSDN to find what needs to be done. Then after 10 months I forget how to do it.


      True laziness is hard work