in reply to Process time out

You could set up a signal that is just a timer and when it sends the signal it would run a sub to kill the process, warn and start again. Try using the alarm function to set the timer then the sigtrap function to break from the wait().