On 4/9/2013 6:10 AM, Jonathan Harris wrote:
Hi All

I am using Strawberry Perl (latest release) on a Windows 2003 SP2 server

I am trying to use a script to look at running processes, look for a
specific process, and kill that process if it is alive for more than 4
minutes as this would mean that the process has hung

When testing killing Notepad or Firefox, it works fine
In practice when trying to kill "ovntag or oprop" processes, it doesn't

It uses the following to kill the process:

Win32::Process::KillProcess ($pid, \$exitcode);

So here's the question.
Is there a difference between killing a process that is alive and one that
has hung?
In theory a process is a process, right?!
But the hanging process does not die!

Is there a better way to kill a process so that a hanging process will
actually die?

Thanks in advance

Jon


It's highly unlikely this will fix your problem, but
I will throw it out for consideration:

$ProcessObj->Kill( $exitcode )
       Kill the associated process, have it terminate with exit code
       $ExitCode


Mike


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to