From 16156b8e27cce5528a98ac36ce09414a42aece68 Mon Sep 17 00:00:00 2001 From: Drazen Kacar Date: Tue, 28 Sep 1999 03:53:08 +0000 Subject: [PATCH] Bugfix. It wasn't excluding system, non-tty or idle processes if that was * proclist.c (glibtop_get_proclist_s): Bugfix. It wasn't excluding system, non-tty or idle processes if that was requested. --- sysdeps/solaris/ChangeLog | 6 ++++++ sysdeps/solaris/proclist.c | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sysdeps/solaris/ChangeLog b/sysdeps/solaris/ChangeLog index 6f25ae49..e1642653 100644 --- a/sysdeps/solaris/ChangeLog +++ b/sysdeps/solaris/ChangeLog @@ -1,3 +1,9 @@ +1999-09-28 Drazen Kacar + + * proclist.c (glibtop_get_proclist_s): Bugfix. It wasn't + excluding system, non-tty or idle processes if that was + requested. + 1999-07-29 Martin Baulig * proctime.c (glibtop_get_proc_time_p): Fix bug reported by diff --git a/sysdeps/solaris/proclist.c b/sysdeps/solaris/proclist.c index 05bc41b9..956ab0a0 100644 --- a/sysdeps/solaris/proclist.c +++ b/sysdeps/solaris/proclist.c @@ -148,7 +148,7 @@ glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf, if(statb.st_uid != arg) continue; } - if(which != GLIBTOP_KERN_PROC_ALL) + if(mask || which != GLIBTOP_KERN_PROC_ALL) { struct psinfo psinfo; @@ -160,8 +160,8 @@ glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf, continue; if(mask & GLIBTOP_EXCLUDE_SYSTEM && psinfo.pr_flag & SSYS) continue; - if(mask & GLIBTOP_EXCLUDE_NOTTY && - psinfo.pr_ttydev == PRNODEV) + if(mask & GLIBTOP_EXCLUDE_NOTTY + && psinfo.pr_ttydev == PRNODEV) continue; } switch(which) @@ -181,7 +181,7 @@ glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf, case GLIBTOP_KERN_PROC_RUID: if(psinfo.pr_uid != arg) continue; break; - default: continue; + default: break; } } #endif