]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/main.c
pid1: update manager settings on reload too
authorFranck Bui <fbui@suse.com>
Wed, 22 Apr 2020 14:16:47 +0000 (16:16 +0200)
committerFranck Bui <fbui@suse.com>
Tue, 19 May 2020 13:31:55 +0000 (15:31 +0200)
commit986935cf6adccf47f5a8a543885fb1d36f5dfb61
treee641748912ba31e66c6730f8d917238b8c43f2d8
parent34d16bad2d07444dcdae380480f5cc8c5eea8eaa
pid1: update manager settings on reload too

Most complexity of this patch is due to the fact that some manager settings
(basically the watchdog properties) can be set at runtime and in this case the
runtime values must be retained over daemon-reload or daemon-reexec.

For consistency sake, all watchdog properties behaves now the same way, that
is:

  - Values defined by config files can be overridden by writing the new value
    through their respective D-BUS properties. In this case, these values are
    preserved over reload/reexec until the special value '0' or USEC_INFINITY
    is written, which will then restore the last values loaded from the config
    files. If the restored value is '0' or 'USEC_INFINITY', the watchdogs will
    be disabled and the corresponding device will be closed.

  - Reading the properties from a user instance will return the USEC_INFINITY
    value as these properties are only meaningful for PID1.

  - Writing to one of the watchdog properties of a user instance's will be a
    NOP.

Fixes: #15453
src/core/dbus-manager.c
src/core/main.c
src/core/manager.c
src/core/manager.h