mirror of https://github.com/xzeldon/htop.git
OpenBSD: Always update username
This commit is contained in:
parent
6a6b09b431
commit
d2a476cddb
|
@ -284,10 +284,8 @@ static void OpenBSDProcessList_scanProcs(OpenBSDProcessList* this) {
|
|||
proc->pgrp = kproc->p__pgid;
|
||||
proc->isKernelThread = proc->pgrp == 0;
|
||||
proc->isUserlandThread = kproc->p_tid != -1;
|
||||
proc->st_uid = kproc->p_uid;
|
||||
proc->starttime_ctime = kproc->p_ustart_sec;
|
||||
Process_fillStarttimeBuffer(proc);
|
||||
proc->user = UsersTable_getRef(this->super.usersTable, proc->st_uid);
|
||||
ProcessList_add(&this->super, proc);
|
||||
|
||||
OpenBSDProcessList_updateProcessName(this->kd, kproc, proc);
|
||||
|
@ -323,6 +321,11 @@ static void OpenBSDProcessList_scanProcs(OpenBSDProcessList* this) {
|
|||
proc->majflt = kproc->p_uru_majflt;
|
||||
proc->nlwp = 1;
|
||||
|
||||
if (proc->st_uid != kproc->p_uid) {
|
||||
proc->st_uid = kproc->p_uid;
|
||||
proc->user = UsersTable_getRef(this->super.usersTable, proc->st_uid);
|
||||
}
|
||||
|
||||
switch (kproc->p_stat) {
|
||||
case SIDL: proc->state = 'I'; break;
|
||||
case SRUN: proc->state = 'P'; break;
|
||||
|
|
Loading…
Reference in New Issue