[issue6394] getppid support in os module on Windows
report at bugs.python.org
Thu Jul 2 16:59:39 CEST 2009
Jon Anglin <janglin at fortresgrand.com> added the comment:
Just some information, on Windows:
- process ids are re-used.
- parent process id is set at process creation time and never updated.
(Windows Internal 4th Ed. by Russinovich and Solomon).
Thus, I would say that a long running process can not rely on the value
of its parent process id. The parent may not be running, or the process
id may have been re-used and the process with that id may not be in fact
the actual parent. Having said that, I don't know the algorithm that
Windows uses for process ids, so collisions may be rare (or not).
-Do these same issues exist on Unix systems?
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list