in reply to Killing a shell script from within a perl script
LOOP1:while($run_count<max) { my $pid = `pidof sh1.sh`; unless ($pid eq ''){ print "Killing Process sh1.sh PID=$pid\n"; kill $pid; sleep 1; next; } else { $shell_out = system("./sh1.sh"); $run_count++; } }
|
|---|