From f8aae8f54480614e50fd3acd1ccdb05c27d061e7 Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Sun, 21 Nov 1999 18:08:10 +0000 Subject: [PATCH] Support GLIBTOP_KERN_PROC_PPID. 1999-11-21 Martin Baulig * proclist.c: (glibtop_get_proclist_s): Support GLIBTOP_KERN_PROC_PPID. --- sysdeps/linux/ChangeLog | 4 ++++ sysdeps/linux/proclist.c | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/sysdeps/linux/ChangeLog b/sysdeps/linux/ChangeLog index 55b3c19b..d7ffeba5 100644 --- a/sysdeps/linux/ChangeLog +++ b/sysdeps/linux/ChangeLog @@ -1,3 +1,7 @@ +1999-11-21 Martin Baulig + + * proclist.c: (glibtop_get_proclist_s): Support GLIBTOP_KERN_PROC_PPID. + 1999-10-19 Martin Baulig * uptime.c (glibtop_get_uptime_s): Don't cast uptime and idletime diff --git a/sysdeps/linux/proclist.c b/sysdeps/linux/proclist.c index 84e33e77..329c0235 100644 --- a/sysdeps/linux/proclist.c +++ b/sysdeps/linux/proclist.c @@ -128,6 +128,13 @@ glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf, if ((int) arg != procuid.pgrp) continue; break; + case GLIBTOP_KERN_PROC_PPID: + /* Do you really, really need this ? */ + glibtop_get_proc_uid_s (server, &procuid, pid); + if (procuid.flags & (1L << GLIBTOP_PROC_UID_PPID)) + if ((int) arg != procuid.ppid) + continue; + break; case GLIBTOP_KERN_PROC_SESSION: /* Do you really, really need this ? */ glibtop_get_proc_uid_s (server, &procuid, pid);