diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2021-01-28 18:19:38 +0100 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2021-01-29 14:12:44 +0100 |
commit | 3acf28c259f1a393badcc2e99c9646e19a911f98 (patch) | |
tree | 78ea9191604c1aca520d358af0927b2c007dbf78 /unsupported/UnsupportedProcessList.c | |
parent | bd694c0ce60a60e29dc4ae22923f251fbd196332 (diff) |
Unsupported: pass compilation
Diffstat (limited to 'unsupported/UnsupportedProcessList.c')
-rw-r--r-- | unsupported/UnsupportedProcessList.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/unsupported/UnsupportedProcessList.c b/unsupported/UnsupportedProcessList.c index 098eb488..8bc42962 100644 --- a/unsupported/UnsupportedProcessList.c +++ b/unsupported/UnsupportedProcessList.c @@ -5,17 +5,21 @@ Released under the GNU GPLv2, see the COPYING file in the source distribution for its full text. */ -#include "ProcessList.h" -#include "UnsupportedProcess.h" +#include "UnsupportedProcessList.h" #include <stdlib.h> #include <string.h> +#include "ProcessList.h" +#include "UnsupportedProcess.h" + ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidMatchList, uid_t userId) { ProcessList* this = xCalloc(1, sizeof(ProcessList)); ProcessList_init(this, Class(Process), usersTable, pidMatchList, userId); + this->cpuCount = 1; + return this; } @@ -41,7 +45,7 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) { proc->pid = 1; proc->ppid = 1; proc->tgid = 0; - proc->comm = "<unsupported architecture>"; + free_and_xStrdup(&proc->comm, "<unsupported architecture>"); proc->basenameOffset = 0; proc->updated = true; @@ -70,4 +74,7 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) { proc->minflt = 20; proc->majflt = 20; + + if (!preExisting) + ProcessList_add(super, proc); } |