PFZheng / psutil

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

`cmdline` should not be cached #331

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
After version 0.5, property `cmdline` of Process is cacheable. 
Could you explain why so? 
There are a lot of situations, when process `cmdline` contains some valuable 
information, which should be processed/validated. 

Thanks.

p.s. update psutil from 0.4.1 to 0.6.1, with cacheable `cmdline`, completely 
crashed our mail fetching monitoring system :)

Original issue reported on code.google.com by Psihon...@gmail.com on 24 Sep 2012 at 3:27

GoogleCodeExporter commented 8 years ago
Cmdline is cached bacause is not supposed to change during the entire lifetime 
of the process (the same applies for process pid, ppid, name an exe).
How exactly your code was affected by this change?
The only difference in terms of compatibility should be that in case the 
process disappears NoSuchProcess is no longer raised.

Original comment by g.rodola on 24 Sep 2012 at 5:15

GoogleCodeExporter commented 8 years ago
runsvdir (of runit) alters its .cmdline to include recent stderr messages from 
all child processes.

Original comment by ruib...@gmail.com on 22 Jan 2013 at 3:18

GoogleCodeExporter commented 8 years ago

Original comment by g.rodola on 22 Jan 2013 at 9:34

GoogleCodeExporter commented 8 years ago
Fixed in r1570.

Original comment by g.rodola on 27 Feb 2013 at 3:25

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Updated csets after the SVN -> Mercurial migration:
r1570 == revision 9d2f1e41eee3

Original comment by g.rodola on 2 Mar 2013 at 12:13

GoogleCodeExporter commented 8 years ago

Original comment by g.rodola on 8 Apr 2013 at 1:21

GoogleCodeExporter commented 8 years ago

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

GoogleCodeExporter commented 8 years ago

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