diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2012-10-20 00:43:25 +0000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2012-10-20 00:43:25 +0000 |
commit | f44a8f2009e443349655e32512ef1dc453f3fa22 (patch) | |
tree | 1170ac0c98bab6490cd72c34c33046349b74c669 /ProcessList.c | |
parent | 1b21827f1f875692e14ee5ac9b22f3fd69fd8593 (diff) |
Option to update process names on every refresh
(thanks to Rob Hoelz)
Diffstat (limited to 'ProcessList.c')
-rw-r--r-- | ProcessList.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ProcessList.c b/ProcessList.c index 30cc8012..04adac54 100644 --- a/ProcessList.c +++ b/ProcessList.c @@ -153,6 +153,7 @@ typedef struct ProcessList_ { bool highlightThreads; bool detailedCPUTime; bool countCPUsFromZero; + bool updateProcessNames; const char **treeStr; } ProcessList; @@ -239,6 +240,7 @@ ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList) { this->highlightMegabytes = false; this->detailedCPUTime = false; this->countCPUsFromZero = false; + this->updateProcessNames = false; this->treeStr = NULL; this->following = -1; @@ -712,6 +714,11 @@ static bool ProcessList_processEntries(ProcessList* this, const char* dirname, P goto errorReadingProcess; ProcessList_add(this, process); + } else { + if (this->updateProcessNames) { + if (! ProcessList_readCmdlineFile(process, dirname, name)) + goto errorReadingProcess; + } } if (process->state == 'Z') { |