in reply to running program?

I usually solve these sorts of problems with supervise from the daemontools package.