Skip to content

Commit

Permalink
FreeBSD: mark the original kernel thread with pid 0 as such
Browse files Browse the repository at this point in the history
  • Loading branch information
cgzones authored and BenBE committed Jul 18, 2021
1 parent 3451b6c commit adcedf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion freebsd/FreeBSDProcessList.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit adcedf8

Please sign in to comment.