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.
This commit is contained in:
Joris Vink 2023-03-08 20:28:49 +01:00
parent 21f466c8b6
commit d49d65dfa0
1 changed files with 3 additions and 3 deletions

View File

@ -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