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.
This commit is contained in:
Drazen Kacar
1999-09-28 03:53:08 +00:00
parent 56f34dd385
commit 16156b8e27
2 changed files with 10 additions and 4 deletions

View File

@@ -1,3 +1,9 @@
1999-09-28 Drazen Kacar <dave@srce.hr>
* 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 <martin@home-of-linux.org>
* proctime.c (glibtop_get_proc_time_p): Fix bug reported by

View File

@@ -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