Deal with NoSuchProcess exception.