check if the pid is alive