phyllisdillon
Programmer
Hello,
I want to start a program from my perlscript and put the result in a database. The following code is run in a loop, changing param1 and param2:
It works fine, but sometimes "program.exe" hangs, which causes the whole script to hang. What I need is to kill "program.exe" when a certain time has passed. Any tip on how I can achieve this?
I want to start a program from my perlscript and put the result in a database. The following code is run in a loop, changing param1 and param2:
Code:
my @args=("program.exe", "--param1", "1", "--param2", "2");
system( @args );
my $exitcode=$?/256;
It works fine, but sometimes "program.exe" hangs, which causes the whole script to hang. What I need is to kill "program.exe" when a certain time has passed. Any tip on how I can achieve this?