On my ubuntu server I run the following command:
python -c 'import os; os.kill(5555, 0)'
This is done so that I can see if pid 5555 is running. From my understanding this should raise an OSError if the pid is not running. This is not raising an OSError for me which means it should be a running process. However when I run:
ps aux | grep 5555
I see no process running with that pid. This also happens on several other pids in that general range, but it does not happen with say 555 or 55555.
Does anyone have any insight as to why os.kill would not raise an OSError like it is expected to?
Note: this is running under python 2.5.1.