pid_exists function

Check whether a process PID exists or not