Re: Win32 - Killing Processes - update possible solution

2013-04-10 Thread Jonathan Harris
On Wed, Apr 10, 2013 at 12:02 PM, Jenda Krynicky wrote: > From: Jonathan Harris > > As it seems that Win32::Process::KillProcess is having difficulties > killing > > a hanging process, I thought that it would probably make sense to ask the > > system to do it directly > > > > So, in the sub 'kil

Re: Win32 - Killing Processes - update possible solution

2013-04-10 Thread Jenda Krynicky
From: Jonathan Harris > As it seems that Win32::Process::KillProcess is having difficulties killing > a hanging process, I thought that it would probably make sense to ask the > system to do it directly > > So, in the sub 'kill_it', I have replaced the line > > Win32::Process::KillProcess ($new_

Re: Win32 - Killing Processes

2013-04-10 Thread Jonathan Harris
; > 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:

Re: Win32 - Killing Processes

2013-04-09 Thread Mike Flannigan
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 tha

Re: Win32 - Killing Processes - update possible solution

2013-04-09 Thread Jonathan Harris
On Tue, Apr 9, 2013 at 5:42 PM, Jonathan Harris wrote: > > > > On Mon, Apr 8, 2013 at 4:41 PM, 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

Re: Win32 - Killing Processes - update possible solution

2013-04-09 Thread Jonathan Harris
On Mon, Apr 8, 2013 at 4:41 PM, 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 a

re: Win32 - Killing Processes

2013-04-08 Thread Jonathan Harris
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 No

KILLING Processes in unix

2006-10-27 Thread perl pra
hi I need to kill java processes in Unix and windows both based on OS check. here is my code use Switch; my $UKILLSTR="ps -ef |grep java | grep -v grep|kill -9 `awk '{print $2}'` ";(this command work if i put in command prompt of the linux box ) my $UKILLSTR1=" my $WKILLSTR="taskkill /IM java

killing processes

2006-10-27 Thread perl pra
hi I need to kill java processes in Unix and windows both based on OS check. here is my code use Switch; my $UKILLSTR="ps -ef |grep java | grep -v grep|kill -9 `awk '{print $2}'` ";(this command work if i put in command prompt of the linux box ) my $UKILLSTR1=" my $WKILLSTR="taskkill /IM java

Re: killing processes after x seconds

2004-01-08 Thread Ramprasad A Padmanabhan
Dan Anderson wrote: Is it possible to (easily) tell perl to kill itself and all children if the script doesn't execute in x seconds? to kill a script in itself you could use alarm($seconds) If you really are serious about killed all forked children properly write a function that will kill a

killing processes after x seconds

2004-01-06 Thread Dan Anderson
Is it possible to (easily) tell perl to kill itself and all children if the script doesn't execute in x seconds? I thought about forking the script and having the parent sleep for x seconds at the top of the process, but that seems like a lot of extra code. I was hoping there wa