Exit when the PID becomes invalid