瀏覽代碼

Actually apply setpriority to the thread not the client

Marc Di Luzio 5 年之前
父節點
當前提交
f00a89bc56
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      daemon/gamemode-sched.c

+ 1 - 1
daemon/gamemode-sched.c

@@ -138,7 +138,7 @@ void game_mode_apply_renice(const GameModeContext *self, const pid_t client, int
 			          tid,
 			          tid,
 			          prio,
 			          prio,
 			          expected);
 			          expected);
-		} else if (setpriority(PRIO_PROCESS, (id_t)client, (int)renice)) {
+		} else if (setpriority(PRIO_PROCESS, (id_t)tid, (int)renice)) {
 			LOG_HINTED(ERROR,
 			LOG_HINTED(ERROR,
 			           "Failed to renice client [%d,%d], ignoring error condition: %s\n",
 			           "Failed to renice client [%d,%d], ignoring error condition: %s\n",
 			           "    -- Your user may not have permission to do this. Please read the docs\n"
 			           "    -- Your user may not have permission to do this. Please read the docs\n"