in reply to Timing and timing out Unix commands
It may be tidier to send SIGINT instead of SIGKILL in sub kill_it. SIGKILL is kind of a crowbar. The named signals are more readable and portable, too.
After Compline,Zaxo