diff options
author | Benny Baumann <BenBE@geshi.org> | 2022-04-03 12:59:21 +0200 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2022-04-21 08:56:56 +0200 |
commit | 1f2f4fe8914768054c562dd4e757a461375681c6 (patch) | |
tree | 7fc3ea18513bc8e2ba675915c5684bb602ae1880 | |
parent | ec809b7f71f21c93c96398caa552eab486c3423d (diff) |
Assume process just started when kproc->ki_start returns garbage
-rw-r--r-- | freebsd/FreeBSDProcessList.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/freebsd/FreeBSDProcessList.c b/freebsd/FreeBSDProcessList.c index 54697116..f58f3387 100644 --- a/freebsd/FreeBSDProcessList.c +++ b/freebsd/FreeBSDProcessList.c @@ -509,6 +509,9 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) { proc->pgrp = kproc->ki_pgid; proc->st_uid = kproc->ki_uid; proc->starttime_ctime = kproc->ki_start.tv_sec; + if (proc->starttime_ctime < 0) { + proc->starttime_ctime = super->realtimeMs / 1000; + } Process_fillStarttimeBuffer(proc); proc->user = UsersTable_getRef(super->usersTable, proc->st_uid); ProcessList_add(super, proc); |