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.
This commit is contained in:
Drazen Kacar
1999-07-16 04:46:27 +00:00
parent 331e128116
commit 71bda8b99d
2 changed files with 10 additions and 4 deletions

View File

@@ -1,3 +1,8 @@
1999-07-16 Drazen Kacar <dave@srce.hr>
* proclist.c: Bug fix. All Solaris versions have RUID and
RGID in /proc.
1999-06-07 Drazen Kacar <dave@srce.hr>
* glibtop_machine.h, open.c, procargs.c, proclist.c, procmap.c:

View File

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