summaryrefslogtreecommitdiff
path: root/bin/ps
diff options
context:
space:
mode:
authorEdward Tomasz Napierala <trasz@FreeBSD.org>2017-09-06 16:18:06 +0000
committerEdward Tomasz Napierala <trasz@FreeBSD.org>2017-09-06 16:18:06 +0000
commite4d52dfd1bb80a6ef3f77993d3cc8417a885b749 (patch)
tree97f70048b6bc02583e82b0470a6ac1f217230c05 /bin/ps
parenteed99cb81b23afeff436062909d07a63e2ab6201 (diff)
downloadsrc-test2-e4d52dfd1bb80a6ef3f77993d3cc8417a885b749.tar.gz
src-test2-e4d52dfd1bb80a6ef3f77993d3cc8417a885b749.zip
Reflect realtime and idle priorities in ps(1) state flags, same like
we do for the usual nice values. It could be argued that they should use another set of indicators, since the underlying mechanism is different, but they match the description in the manual page, and so I think it's ok to not overcomplicate things. PR: 81757 MFC after: 2 weeks Sponsored by: DARPA, AFRL
Notes
Notes: svn path=/head/; revision=323225
Diffstat (limited to 'bin/ps')
-rw-r--r--bin/ps/print.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c
index d84628771ff0..3c8214a3bb37 100644
--- a/bin/ps/print.c
+++ b/bin/ps/print.c
@@ -262,9 +262,9 @@ state(KINFO *k, VARENT *ve __unused)
cp++;
if (!(flag & P_INMEM))
*cp++ = 'W';
- if (k->ki_p->ki_nice < NZERO)
+ if (k->ki_p->ki_nice < NZERO || k->ki_p->ki_pri.pri_class == PRI_REALTIME)
*cp++ = '<';
- else if (k->ki_p->ki_nice > NZERO)
+ else if (k->ki_p->ki_nice > NZERO || k->ki_p->ki_pri.pri_class == PRI_IDLE)
*cp++ = 'N';
if (flag & P_TRACED)
*cp++ = 'X';