From f44a8f2009e443349655e32512ef1dc453f3fa22 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Sat, 20 Oct 2012 00:43:25 +0000 Subject: Option to update process names on every refresh (thanks to Rob Hoelz) --- ProcessList.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ProcessList.c') 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') { -- cgit v1.2.3