svn commit: r194200 - stable/7/bin/ps
Jilles Tjoelker
jilles at FreeBSD.org
Sun Jun 14 17:05:55 UTC 2009
Author: jilles
Date: Sun Jun 14 17:05:54 2009
New Revision: 194200
URL: http://svn.freebsd.org/changeset/base/194200
Log:
MFC r192688: fix nonsense in ps etime field for swapped out processes
PR: bin/123069
Submitted by: Vladimir Kozbin
Approved by: ed (mentor)
Modified:
stable/7/bin/ps/ (props changed)
stable/7/bin/ps/print.c
Modified: stable/7/bin/ps/print.c
==============================================================================
--- stable/7/bin/ps/print.c Sun Jun 14 17:03:59 2009 (r194199)
+++ stable/7/bin/ps/print.c Sun Jun 14 17:05:54 2009 (r194200)
@@ -572,6 +572,10 @@ elapsed(KINFO *k, VARENT *ve)
char obuff[128];
v = ve->var;
+ if (!k->ki_valid) {
+ (void)printf("%-*s", v->width, "-");
+ return;
+ }
val = now - k->ki_p->ki_start.tv_sec;
days = val / (24 * 60 * 60);
val %= 24 * 60 * 60;
More information about the svn-src-stable-7
mailing list