**** 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
1e629c9a86
commit
e94b4882b6
@@ -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-10-19 Martin Baulig <martin@home-of-linux.org>
|
1999-10-19 Martin Baulig <martin@home-of-linux.org>
|
||||||
|
|
||||||
* uptime.c (glibtop_get_uptime_s): Don't cast uptime and idletime
|
* uptime.c (glibtop_get_uptime_s): Don't cast uptime and idletime
|
||||||
|
@@ -59,7 +59,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;
|
return;
|
||||||
@@ -72,6 +72,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