mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Use KERN_PROC_PROC instead of KERN_PROC_ALL on the call to kvm_getprocs(),
so we get one line per process instead of one for each kernel-thread. Noticed by: ache & tjr
This commit is contained in:
parent
20baa54f6b
commit
c3f750cfbf
1 changed files with 5 additions and 1 deletions
|
|
@ -260,7 +260,11 @@ main(int argc, char **argv)
|
|||
if (kd == NULL)
|
||||
errx(STATUS_ERROR, "kvm_openfiles(): %s", buf);
|
||||
|
||||
plist = kvm_getprocs(kd, KERN_PROC_ALL, 0, &nproc);
|
||||
/*
|
||||
* Use KERN_PROC_PROC instead of KERN_PROC_ALL, since we
|
||||
* just want processes and not individual kernel threads.
|
||||
*/
|
||||
plist = kvm_getprocs(kd, KERN_PROC_PROC, 0, &nproc);
|
||||
if (plist == NULL)
|
||||
errx(STATUS_ERROR, "kvm_getprocs() failed");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue