core/exec-invoke: call setpriority() after sched_setattr()
authorIvan Shapovalov <intelfx@intelfx.name>
Wed, 7 Aug 2024 08:02:45 +0000 (10:02 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sat, 10 Aug 2024 17:09:14 +0000 (19:09 +0200)
commit711a157738b3dcd29a5ebc8f498eb46bfac59652
tree17ded464462d17394175e71af871bcbd78d65a5b
parent7036dd8b27b1ccca1f76723814145f17283d2656
core/exec-invoke: call setpriority() after sched_setattr()

The nice value is part of struct sched_attr, and consequently invoking
sched_setattr() after setpriority() would clobber the nice value with
the default (as we are not setting it in struct sched_attr).

It would be best to combine both calls, but for now simply invoke
setpriority() after sched_setattr() to make sure Nice= remains effective
when used together with CPUSchedulingPolicy=.
src/core/exec-invoke.c