1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-27 09:08:25 +00:00

${top}: fix bug of living dead processes

This fixes a bug occurred with 0b3e3c637e5453c6a45fca2cb9af5839366290c8.
Dead processes still appeared in ${top} under FreeBSD and OpenBSD.  This was
because I forgot to update the g_time variable which is used as time stamp in
the process list.

Signed-off-by: Alexander Graf <agraf@znc.in>
This commit is contained in:
Alexander Graf 2010-06-03 22:07:57 +02:00
parent 3fa1ca15e1
commit 1180733e13
2 changed files with 6 additions and 1 deletions

View File

@ -2711,7 +2711,6 @@ static void update_process_table(void)
}
info.run_procs = 0;
++g_time;
/* Get list of processes from /proc directory */
while ((entry = readdir(dir))) {

View File

@ -330,6 +330,12 @@ static void process_find_top(struct process **cpu, struct process **mem,
pq_set_max_size(io_queue, MAX_SP);
#endif
/* g_time is the time_stamp entry for process. It is updated when the
* process information is updated to indicate that the process is still
* alive (and must not be removed from the process list in
* process_cleanup()) */
++g_time;
/* OS-specific function updating process list */
get_top_info();