1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

It seems that 1 was not a magic value as I thought, but a coincidence.

Instead of applying the adjustment to processes with a start time of 1,
apply it to all processes with a start time of less than 3600.

None of this would be necessary if the start times were recorded in ticks
instead of seconds and microseconds.
This commit is contained in:
Dag-Erling Smørgrav 2003-04-24 12:12:06 +00:00
parent ceff7f2a48
commit 013466aa50
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=113966

View File

@ -679,8 +679,8 @@ fill_kinfo_proc(p, kp)
}
if ((p->p_sflag & PS_INMEM) && p->p_stats) {
kp->ki_start = p->p_stats->p_start;
if (kp->ki_start.tv_sec == 1)
kp->ki_start = boottime;
if (kp->ki_start.tv_sec < 3600)
kp->ki_start.tv_sec += boottime.tv_sec;
kp->ki_rusage = p->p_stats->p_ru;
kp->ki_childtime.tv_sec = p->p_stats->p_cru.ru_utime.tv_sec +
p->p_stats->p_cru.ru_stime.tv_sec;