The technique used there gets the ID of the current running process, whereas we need to check and see if an arbitrary process ID is active, so that won't work.