summaryrefslogtreecommitdiff
path: root/sys/kern/tty.c
diff options
context:
space:
mode:
authorDmitrij Tejblum <dt@FreeBSD.org>1999-05-22 20:10:31 +0000
committerDmitrij Tejblum <dt@FreeBSD.org>1999-05-22 20:10:31 +0000
commit9d3a4425833fdfb43b86a1df924a26fcf89f27f9 (patch)
tree7f0a2b6bcc22590b8b78e74dc78eb6d629493399 /sys/kern/tty.c
parent53ee42d318231cd7fffb5b76c866a8ea7d006819 (diff)
Notes
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r--sys/kern/tty.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 8b946cf98ec3..e9de97ba0cf4 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)tty.c 8.8 (Berkeley) 1/21/94
- * $Id: tty.c,v 1.117 1999/05/06 18:12:47 peter Exp $
+ * $Id: tty.c,v 1.118 1999/05/08 06:39:42 phk Exp $
*/
/*-
@@ -2260,15 +2260,18 @@ ttyinfo(tp)
pick->p_stat == SRUN ? "running" :
pick->p_wmesg ? pick->p_wmesg : "iowait");
- calcru(pick, &utime, &stime, NULL);
+ if (pick->p_flag & P_INMEM) {
+ calcru(pick, &utime, &stime, NULL);
- /* Print user time. */
- ttyprintf(tp, "%ld.%02ldu ",
- utime.tv_sec, utime.tv_usec / 10000);
+ /* Print user time. */
+ ttyprintf(tp, "%ld.%02ldu ",
+ utime.tv_sec, utime.tv_usec / 10000);
- /* Print system time. */
- ttyprintf(tp, "%ld.%02lds ",
- stime.tv_sec, stime.tv_usec / 10000);
+ /* Print system time. */
+ ttyprintf(tp, "%ld.%02lds ",
+ stime.tv_sec, stime.tv_usec / 10000);
+ } else
+ ttyprintf(tp, "?.??u ?.??s ");
/* Print percentage cpu, resident set size. */
tmp = (pick->p_pctcpu * 10000 + FSCALE / 2) >> FSHIFT;