Is there a way to check to see if a pid corrosponds to a valid process? I'm getting a pid from a different source other than from os.getpid() and I need to check to see if a process with that pid doesn't exist on the machine. Much thanks.
Update: I need it to be available in Unix and Windows.
Update #2: I should be more specific - I'm checking to see if the PID is NOT in use.