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:
Benoit Dejean
2015-02-28 01:43:57 +01:00
committed by Robert Roth
parent 7b2416a8d1
commit b2fee3e111

View File

@@ -54,9 +54,6 @@ glibtop_get_proc_state_p (glibtop *server,
memset (buf, 0, sizeof (glibtop_proc_state));
/* It does not work for the swapper task. */
if (pid == 0) return;
/* Get the process information */
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count);
if ((pinfo == NULL) || (count != 1)) {