It does not work to get information about the swapper task on FreeBSD
1998-11-11 Martin Baulig <martin@home-of-linux.org> * *.c: It does not work to get information about the swapper task on FreeBSD 2.2.6, so we simple return if pid == 0.
This commit is contained in:
committed by
Martin Baulig
parent
fffabe63b7
commit
d46c6227fb
@@ -78,12 +78,19 @@ glibtop_get_proc_map_p (glibtop *server, glibtop_proc_map *buf,
|
||||
int count, i = 0;
|
||||
int update = 0;
|
||||
|
||||
glibtop_init_p (server, (1 << GLIBTOP_SYSDEPS_PROC_MAP), 0);
|
||||
|
||||
memset (buf, 0, sizeof (glibtop_proc_map));
|
||||
|
||||
/* It does not work for the swapper task. */
|
||||
if (pid == 0) return NULL;
|
||||
|
||||
glibtop_suid_enter (server);
|
||||
|
||||
/* Get the process data */
|
||||
pinfo = kvm_getprocs (server->machine.kd, KERN_PROC_PID, pid, &count);
|
||||
if ((pinfo == NULL) || (count < 1))
|
||||
glibtop_error_io_r (server, "kvm_getprocs (proclist)");
|
||||
glibtop_error_io_r (server, "kvm_getprocs (%d)", pid);
|
||||
|
||||
/* Now we get the memory maps. */
|
||||
|
||||
|
Reference in New Issue
Block a user