Try:
os.kill(pid, 0)
Should succeed (and do nothing) if the process exists, or throw an exception (that you can catch) if the process doesn’t exist.
Try:
os.kill(pid, 0)
Should succeed (and do nothing) if the process exists, or throw an exception (that you can catch) if the process doesn’t exist.