From 71bda8b99d193ee4052f8ba21a65243ad40c73b5 Mon Sep 17 00:00:00 2001 From: Drazen Kacar Date: Fri, 16 Jul 1999 04:46:27 +0000 Subject: [PATCH] Bug fix. All Solaris versions have RUID and RGID in struct stat for * proclist.c: Bug fix. All Solaris versions have RUID and RGID in struct stat for files/directories in /proc. --- sysdeps/solaris/ChangeLog | 5 +++++ sysdeps/solaris/proclist.c | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sysdeps/solaris/ChangeLog b/sysdeps/solaris/ChangeLog index 6a9f8aec..10c84450 100644 --- a/sysdeps/solaris/ChangeLog +++ b/sysdeps/solaris/ChangeLog @@ -1,3 +1,8 @@ +1999-07-16 Drazen Kacar + + * proclist.c: Bug fix. All Solaris versions have RUID and + RGID in /proc. + 1999-06-07 Drazen Kacar * glibtop_machine.h, open.c, procargs.c, proclist.c, procmap.c: diff --git a/sysdeps/solaris/proclist.c b/sysdeps/solaris/proclist.c index 192e2673..05bc41b9 100644 --- a/sysdeps/solaris/proclist.c +++ b/sysdeps/solaris/proclist.c @@ -133,11 +133,12 @@ glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf, #ifdef HAVE_PROCFS_H - /* Can we skip it based on the request? Solaris 2.6 - has ruid and rgid in struct stat. Solaris 7 has euid - and egid. We'll ignore 2.6 for now */ + /* Can we skip it based on the request? We have + RUID and RGID in struct stat. But we can't do it + like this for LP64 process, because stat() will fail. + XXX Unimplemented for now */ - if(!mask && which == GLIBTOP_KERN_PROC_UID) + if(!mask && which == GLIBTOP_KERN_PROC_RUID) { sprintf (buffer, "/proc/%d", pid); if (s_stat (buffer, &statb)) continue;