No special case for pid == 0. As of 2015, with FreeBSD 10.1-RELEASE #0 r274401 on amd64, this really works and sets the name to "kernel" for pid == 0.
This commit is contained in:
committed by
Robert Roth
parent
7b2416a8d1
commit
b2fee3e111
@@ -54,9 +54,6 @@ glibtop_get_proc_state_p (glibtop *server,
|
|||||||
|
|
||||||
memset (buf, 0, sizeof (glibtop_proc_state));
|
memset (buf, 0, sizeof (glibtop_proc_state));
|
||||||
|
|
||||||
/* It does not work for the swapper task. */
|
|
||||||
if (pid == 0) return;
|
|
||||||
|
|
||||||
/* Get the process information */
|
/* Get the process information */
|
||||||
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count);
|
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count);
|
||||||
if ((pinfo == NULL) || (count != 1)) {
|
if ((pinfo == NULL) || (count != 1)) {
|
||||||
|
Reference in New Issue
Block a user