How to tell if a forked process is done?

Christos TZOTZIOY Georgiou tzot at sil-tec.gr
Wed Sep 24 19:05:42 CEST 2003


On Wed, 24 Sep 2003 06:27:41 +0000 (UTC), rumours say that Klaus
Alexander Seistrup <spam at magnetic-ink.dk> might have written:

>This will yield a false positive and potential damage if the OS has
>spawned another process with the same pid, and running under your uid,
>as the task you wanted to supervise.

This *could* happen (I have seen 16-bit-pid systems with a couple of
stupid processes spawning children too rapidly), but if you are not root
and you are sure that your own processes do not breed like rabbits, then
you can be almost sure that os.kill(pid, 0) will throw an EPERM if your
child has died.
-- 
TZOTZIOY, I speak England very best,
Microsoft Security Alert: the Matrix began as open source.




More information about the Python-list mailing list