Skip to content

Process.name unnecessarily calls exe()  #431

Closed
@giampaolo

Description

From g.rodola on September 21, 2013 19:47:47

On basically all UNIX systems the process name we get is truncated to the first 
15 characters so in case the the name matches the first part of the process 
cmdline we return that one instead because it's usually more explicative (e.g. 
"gnome-keyring-d" vs. "gnome-keyring-daemon").

Problem is we do this all the time, even if len(name) < 15 characters so we 
unnecessarily retrieve process cmdline every time we're interested just in the 
process name: 
https://code.google.com/p/psutil/source/browse/psutil/__init__.py?spec=svn890e3d6e20838ea11c86edb8990a0cac730a224e&r=32ca76279dced38e87e8c68b5a203f7ade365672#294
 Fixed in revision dfe28538a19f .

Original issue: http://code.google.com/p/psutil/issues/detail?id=431

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions