zhengzheng / psutil

Automatically exported from code.google.com/p/psutil
Other
0 stars 0 forks source link

Process wait() should check PID has not been reused #365

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
...so that we don't wait on another process' PID.
Note that Process class guarantees this security only for "sensitive" methods 
such as kill(), send_signal(), etc..
Other methods (basically all get_* methods) doesn't have such guarantee.

Original issue reported on code.google.com by g.rodola on 11 Apr 2013 at 9:12

GoogleCodeExporter commented 8 years ago
Fixed in revision d32bfe6af5c4.

Original comment by g.rodola on 11 Apr 2013 at 9:16

GoogleCodeExporter commented 8 years ago

Original comment by g.rodola on 11 Apr 2013 at 9:17

GoogleCodeExporter commented 8 years ago
set_nice() should use the same check. Done in revision d514e4e43e5c.

Original comment by g.rodola on 11 Apr 2013 at 9:55

GoogleCodeExporter commented 8 years ago
It turned out it's wiser to avoid the PID reuse check on Windows as per 
revision e305df5644c3.

Original comment by g.rodola on 11 Apr 2013 at 1:29

GoogleCodeExporter commented 8 years ago
Reverted the wait() change as per revision 4ab86014a0c8 (rationale is in the 
commit message).

Original comment by g.rodola on 11 Apr 2013 at 8:17

GoogleCodeExporter commented 8 years ago

Original comment by g.rodola on 12 Apr 2013 at 6:21