**** Merged from Hardangervidda ****

1999-11-28  Martin Baulig  <martin@home-of-linux.org>

	* procstate.c (glibtop_get_procstate_s): Stat "/proc/<pid>" instead
	of "/proc/<pid>/state" to get `uid' and `gid'. Thanks to Jason Becker
	for pointing out that GTop reported wrong uid's.
This commit is contained in:
Martin Baulig
1999-11-28 11:58:14 +00:00
committed by Martin Baulig
parent 566e05bb33
commit abb3ba2c6a
2 changed files with 9 additions and 1 deletions

View File

@@ -1,3 +1,9 @@
1999-11-28 Martin Baulig <martin@home-of-linux.org>
* procstate.c (glibtop_get_procstate_s): Stat "/proc/<pid>" instead
of "/proc/<pid>/state" to get `uid' and `gid'. Thanks to Jason Becker
for pointing out that GTop reported wrong uid's.
1999-11-21 Martin Baulig <martin@home-of-linux.org>
* interfaces.c: New file.

View File

@@ -61,7 +61,7 @@ glibtop_get_proc_state_s (glibtop *server, glibtop_proc_state *buf, pid_t pid)
* values; NEVER set their flags values if this
* is not the case !!! */
sprintf (buffer, "/proc/%d/stat", pid);
sprintf (buffer, "/proc/%d", pid);
if (stat (buffer, &statb))
return -1;
@@ -74,6 +74,8 @@ glibtop_get_proc_state_s (glibtop *server, glibtop_proc_state *buf, pid_t pid)
buf->flags = _glibtop_sysdeps_proc_state_uid;
sprintf (buffer, "/proc/%d", pid);
/* Now we read the remaining fields. */
if (proc_stat_to_buffer (buffer, pid))