cvs commit: src/sys/kern kern_proc.c

Nate Lawson nate at root.org
Thu Apr 24 17:18:20 PDT 2003


On Wed, 23 Apr 2003, Dag-Erling Smorgrav wrote:
>   When filling out a kinfo_proc structure, if we come across a process
>   whose p_stats->p_start has the magic value 1, replace it with boottime.
>   Some users were apparently confused by the fact that ps(1) reported a
>   start time in early 1970 for system processes.
>   
>   Revision  Changes    Path
>   1.180     +2 -0      src/sys/kern/kern_proc.c
> 
> @@ -673,6 +673,8 @@
>  	}
>  	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;
>  		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;

I'm not sure how the above can compile since the types in assignment don't
match.

-Nate



More information about the cvs-src mailing list