FreeBSD: mark the original kernel thread with pid 0 as such

This commit is contained in:
Christian Göttsche 2021-06-13 11:20:54 +02:00 committed by Benny Baumann
parent 3451b6c6b8
commit adcedf87f5
1 changed files with 1 additions and 1 deletions

View File

@ -498,7 +498,7 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
if (!preExisting) {
fp->jid = kproc->ki_jid;
proc->pid = kproc->ki_pid;
proc->isKernelThread = kproc->ki_pid != 0 && kproc->ki_pid != 1 && (kproc->ki_flag & P_SYSTEM);
proc->isKernelThread = kproc->ki_pid != 1 && (kproc->ki_flag & P_SYSTEM);
proc->isUserlandThread = false;
proc->ppid = kproc->ki_ppid;
proc->tpgid = kproc->ki_tpgid;