Test if a process with a given pid is running