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 working. In my opinion, this should raise an OSError if pid is not working. This does not raise an OSError for me, which means that this must be a running process. However, when I run:
ps aux | grep 5555
I see that the process is not working with this pid. This also occurs at several other peaks in this general range, but this does not occur, for example, 555 or 55555.
Does anyone have an idea why os.kill will not raise an OSError as expected?
Note: this runs under python 2.5.1.
source
share