**** 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:
committed by
Martin Baulig
parent
566e05bb33
commit
abb3ba2c6a
@@ -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>
|
1999-11-21 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
* interfaces.c: New file.
|
* interfaces.c: New 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
|
* values; NEVER set their flags values if this
|
||||||
* is not the case !!! */
|
* is not the case !!! */
|
||||||
|
|
||||||
sprintf (buffer, "/proc/%d/stat", pid);
|
sprintf (buffer, "/proc/%d", pid);
|
||||||
|
|
||||||
if (stat (buffer, &statb))
|
if (stat (buffer, &statb))
|
||||||
return -1;
|
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;
|
buf->flags = _glibtop_sysdeps_proc_state_uid;
|
||||||
|
|
||||||
|
sprintf (buffer, "/proc/%d", pid);
|
||||||
|
|
||||||
/* Now we read the remaining fields. */
|
/* Now we read the remaining fields. */
|
||||||
|
|
||||||
if (proc_stat_to_buffer (buffer, pid))
|
if (proc_stat_to_buffer (buffer, pid))
|
||||||
|
Reference in New Issue
Block a user