From dd46d6a00e4af444d423383abbc538436a170e2b Mon Sep 17 00:00:00 2001 From: Jasper Lievisse Adriaanse Date: Sun, 18 Sep 2011 13:42:13 +0200 Subject: [PATCH] Don't bother with PIDs below 20 as they are highly likely to be kernel threads anyway. --- sysdeps/openbsd/procargs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sysdeps/openbsd/procargs.c b/sysdeps/openbsd/procargs.c index 900a3a2b..710be5e7 100644 --- a/sysdeps/openbsd/procargs.c +++ b/sysdeps/openbsd/procargs.c @@ -58,8 +58,11 @@ glibtop_get_proc_args_p (glibtop *server, glibtop_proc_args *buf, memset (buf, 0, sizeof (glibtop_proc_args)); - /* swapper, init, pagedaemon, vmdaemon, update - this doen't work. */ - if (pid < 5) return NULL; + /* + * Don't bother with PIDs below 20, because everything below this + * number is highly likely to be a kernel thread. + */ + if (pid < 19) return NULL; glibtop_suid_enter (server);