Restart logic for monitored process