From 07086fcf776833e9e2a7ad7f8bd6c1a5481d0d00 Mon Sep 17 00:00:00 2001 From: Ivan Kozik Date: Tue, 6 Sep 2016 09:22:38 +0000 Subject: [PATCH] Fix column misalignment for priority -101 threads BFS-patched kernels can have kernel threads with priority -101. This change makes priority -101 display as "RT", just like priority -100. Related: https://github.com/hishamhm/htop/issues/314 --- Process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Process.c b/Process.c index 8e2abb6a..6a904e2c 100644 --- a/Process.c +++ b/Process.c @@ -429,7 +429,7 @@ void Process_writeField(Process* this, RichString* str, ProcessField field) { case PID: snprintf(buffer, n, Process_pidFormat, this->pid); break; case PPID: snprintf(buffer, n, Process_pidFormat, this->ppid); break; case PRIORITY: { - if(this->priority == -100) + if(this->priority <= -100) snprintf(buffer, n, " RT "); else snprintf(buffer, n, "%3ld ", this->priority);