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
This commit is contained in:
Edward Tomasz Napierala 2017-09-06 16:18:06 +00:00
parent eed99cb81b
commit e4d52dfd1b

View File

@ -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';