]> git.ipfire.org Git - thirdparty/systemd.git/commit
pid1: when reloading configuration, forget old settings
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 24 May 2019 07:41:44 +0000 (09:41 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 29 May 2019 08:29:28 +0000 (10:29 +0200)
commitfb39af4ce42d7ef9af63009f271f404038703704
tree5329bafac32e9347c51c4351cfa8fc7da802cf84
parent470a5e6dcec4637439ae953002127af214d396ac
pid1: when reloading configuration, forget old settings

If we had a configuration setting from a configuration file, and it was
removed, we'd still remember the old value, because there's was no mechanism to
"reset" everything, just to assign new values.

Note that the effect of this is limited. For settings that have an "ongoing" effect,
like systemd.confirm_spawn, the new value is simply used. But some settings can only
be set at start.

In particular, CPUAffinity= will be updated if set to a new value, but if
CPUAffinity= is fully removed, it will not be reset, simply because we don't
know what to reset it to. We might have inherited a setting, or we might have
set it ourselves. In principle we could remember the "original" value that was
set when we were executed, but propagate this over reloads and reexecs, but
that would be a lot of work for little gain. So this corner case of removal of
CPUAffinity= is not handled fully, and a reboot is needed to execute the
change. As a work-around, a full mask of CPUAffinity=0-8191 can be specified.
src/core/main.c