1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-10 16:58:28 +03:00

core: actually set the CPU scheduling policy when deserializing it

This commit is contained in:
Frantisek Sumsal 2023-10-27 17:16:57 +02:00
parent 2f1d114010
commit a4b156bb24

View File

@ -2968,9 +2968,9 @@ static int exec_context_deserialize(ExecContext *c, FILE *f) {
return r;
c->ioprio_set = true;
} else if ((val = startswith(l, "exec-context-cpu-scheduling-policy="))) {
r = sched_policy_from_string(val);
if (r < 0)
return r;
c->cpu_sched_policy = sched_policy_from_string(val);
if (c->cpu_sched_policy < 0)
return -EINVAL;
c->cpu_sched_set = true;
} else if ((val = startswith(l, "exec-context-cpu-scheduling-priority="))) {
r = safe_atoi(val, &c->cpu_sched_priority);