check if a process with the pid is running