aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/tty_info.c
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2009-01-29 09:32:56 +0000
committerRobert Watson <rwatson@FreeBSD.org>2009-01-29 09:32:56 +0000
commitad765b09459ed118db2a2fac7a72c60df438d9fe (patch)
treed679ec6e9424f8c015beb61e25565e5911c175be /sys/kern/tty_info.c
parent9c8e8e3aa72a8ab18e79fa854dbce83f3599438c (diff)
downloadsrc-ad765b09459ed118db2a2fac7a72c60df438d9fe.tar.gz
src-ad765b09459ed118db2a2fac7a72c60df438d9fe.zip
If a process is a zombie and we couldn't identify another useful state,
print out the state as "zombine" in preference to "unknown" when ^T is pressed. MFC after: 3 days Sponsored by: Google, Inc.
Notes
Notes: svn path=/head/; revision=187881
Diffstat (limited to 'sys/kern/tty_info.c')
-rw-r--r--sys/kern/tty_info.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/tty_info.c b/sys/kern/tty_info.c
index de06775ab9e4..cbd74023bbab 100644
--- a/sys/kern/tty_info.c
+++ b/sys/kern/tty_info.c
@@ -285,6 +285,8 @@ tty_info(struct tty *tp)
state = "suspended";
else if (TD_AWAITING_INTR(td))
state = "intrwait";
+ else if (pick->p_state == PRS_ZOMBIE)
+ state = "zombie";
else
state = "unknown";
pctcpu = (sched_pctcpu(td) * 10000 + FSCALE / 2) >> FSHIFT;