diff options
author | Daniel Lange <DLange@git.local> | 2016-04-11 13:00:16 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2016-04-11 13:00:16 +0200 |
commit | c868e3f8d629e1caddff1a51a7d2dd04f49994a3 (patch) | |
tree | dee0881088acc628312dcaaff8209184f4a2560b /Process.c | |
parent | d3c9975943df58e293359b87905d19ff1fd52061 (diff) | |
download | debian_htop-c868e3f8d629e1caddff1a51a7d2dd04f49994a3.tar.gz debian_htop-c868e3f8d629e1caddff1a51a7d2dd04f49994a3.tar.bz2 debian_htop-c868e3f8d629e1caddff1a51a7d2dd04f49994a3.zip |
Imported Upstream version 0.5.1upstream/0.5.1
Diffstat (limited to 'Process.c')
-rw-r--r-- | Process.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -170,8 +170,9 @@ bool Process_equals(const Object* o1, const Object* o2) { } void Process_setPriority(Process* this, int priority) { + int old_prio = getpriority(PRIO_PROCESS, this->pid); int err = setpriority(PRIO_PROCESS, this->pid, priority); - if (err == 0) { + if (err == 0 && old_prio != getpriority(PRIO_PROCESS, this->pid)) { this->nice = priority; } } |