From f00a89bc567219083c07a5bfdc8ccbf3c4aa8971 Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Mon, 13 May 2019 18:43:28 +0100 Subject: [PATCH] Actually apply setpriority to the thread not the client --- daemon/gamemode-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/gamemode-sched.c b/daemon/gamemode-sched.c index 156c9f3..0414b96 100644 --- a/daemon/gamemode-sched.c +++ b/daemon/gamemode-sched.c @@ -138,7 +138,7 @@ void game_mode_apply_renice(const GameModeContext *self, const pid_t client, int tid, prio, expected); - } else if (setpriority(PRIO_PROCESS, (id_t)client, (int)renice)) { + } else if (setpriority(PRIO_PROCESS, (id_t)tid, (int)renice)) { LOG_HINTED(ERROR, "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"