commit d49d65dfa03cfb8dce8be37121f20c5ea949a0eb
parent 21f466c8b62a10327e58eea09a72606d2b433e1a
Author: Joris Vink <joris@coders.se>
Date: Wed, 8 Mar 2023 20:28:49 +0100
Reshuffle call to kore_platform_worker_setcpu().
Its better to place this inside of kore_worker_privsep(), this
way it'll be called for each process still and we can do it
before we sandbox the processes completely.
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/worker.c b/src/worker.c
@@ -369,6 +369,9 @@ kore_worker_privsep(void)
if (worker == NULL)
fatalx("%s called with no worker", __func__);
+ if (worker_set_affinity == 1)
+ kore_platform_worker_setcpu(worker);
+
pw = NULL;
/* Must happen before chroot. */
@@ -749,9 +752,6 @@ kore_worker_started(void)
{
const char *chroot;
- if (worker_set_affinity == 1)
- kore_platform_worker_setcpu(worker);
-
if (worker->ps->skip_chroot)
chroot = "root";
else