1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-07 17:17:44 +03:00
systemd-stable/src/core
Yu Watanabe f85856c00d manager: always close idle pipe when sending ready notification
This fixes a bug introduced by 6d93265955.

The commit makes several functions skipped if the manager is already
in finished state, as
> In manager_check_finished(), more steps are skipped if MANAGER_IS_FINISHED().
> Those steps are idempotent, but no need to waste cycles trying to do them
> more than once.

However, the idle pipe may be re-opened after manager is finished:
manager_dispatch_run_queue() -> manager_watch_idle_pipe().
So, the closing the pipe is not idempotent here.

Fixes #21889.

(cherry picked from commit 9c1b17c3dc)
2022-01-04 16:18:55 +01:00
..
bpf meson: use subdir_done() to reduce indent 2021-12-10 19:54:33 +09:00
all-units.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
apparmor-setup.c tree-wide: reset the cleaned-up variable in cleanup functions 2021-02-16 17:15:11 +01:00
apparmor-setup.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
audit-fd.c license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
audit-fd.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
automount.c Revert "core: Propagate condition failed state to triggering units." 2021-12-17 19:39:29 +01:00
automount.h Revert "core: Propagate condition failed state to triggering units." 2021-12-17 19:39:29 +01:00
bpf-devices.c core: remove refcount for bpf program 2021-10-12 12:48:23 +02:00
bpf-devices.h core: remove refcount for bpf program 2021-10-12 12:48:23 +02:00
bpf-firewall.c Merge pull request #21583 from bluca/bpf_assert 2021-12-02 07:47:17 +09:00
bpf-firewall.h bpf-firewall: move destruction of IP firewall objects to bpf-firewall.c 2021-06-08 21:54:49 +02:00
bpf-foreign.c core: check fs type of BPFProgram= property path 2021-11-11 00:09:15 -08:00
bpf-foreign.h core: fix bpf-foreign cg controller realization 2021-11-10 21:00:25 -08:00
bpf-lsm.c bpf: fix memleak in restrict_fs_bpf 2021-11-24 09:37:33 +01:00
bpf-lsm.h core: add RestrictFileSystems= fragment parser 2021-10-06 10:52:14 +02:00
bpf-socket-bind.c bpf: refactor skeleton generation 2021-12-07 18:37:17 +01:00
bpf-socket-bind.h tree-wide: fix SPDX short identifier for LGPL-2.1-or-later 2021-10-01 17:27:34 +01:00
cgroup.c Merge pull request #20522 from yuwata/cgroup-fix 2021-12-07 10:24:44 +01:00
cgroup.h core: use LSM BPF functions to implement RestrictFileSystems= 2021-10-06 10:52:14 +02:00
core-varlink.c json: add new JSON_BUILD_CONST_STRING() macro 2021-11-25 14:22:31 +01:00
core-varlink.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
dbus-automount.c core/automount: Add ExtraOptions field 2021-11-23 09:44:35 +01:00
dbus-automount.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
dbus-cgroup.c cgroup: add support for StartupAllowedCPUs and StartupAllowedMemoryNodes 2021-09-15 09:30:12 +01:00
dbus-cgroup.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
dbus-device.c license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
dbus-device.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
dbus-execute.c ioprio: normalize io priority values in configuration 2021-11-24 16:12:15 +01:00
dbus-execute.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
dbus-job.c treewide: tighten variable scope in loops (#18372) 2021-01-27 08:19:39 +01:00
dbus-job.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
dbus-kill.c license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
dbus-kill.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
dbus-manager.c Merge pull request #20476 from jamacku/new-feature-reloaded-stamp 2021-12-07 18:47:25 +01:00
dbus-manager.h Add D-Bus property exposing Ctrl-Alt-Delete action (#19217) 2021-04-23 09:57:14 +02:00
dbus-mount.c license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
dbus-mount.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
dbus-path.c path unit: add TriggerLimitBurst= and TriggerLimitIntervalSec= 2021-12-18 23:17:53 +00:00
dbus-path.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
dbus-scope.c core: implement RuntimeMaxDeltaSec directive 2021-09-28 16:46:20 +02:00
dbus-scope.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
dbus-service.c Reintroduce ExitType 2021-11-08 10:15:23 +01:00
dbus-service.h pid1: add DBUS method to mount image inside a running service namespace 2021-01-21 18:37:00 +00:00
dbus-slice.c license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
dbus-slice.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
dbus-socket.c Drop the text argument from assert_not_reached() 2021-08-03 10:05:10 +02:00
dbus-socket.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
dbus-swap.c license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
dbus-swap.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
dbus-target.c license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
dbus-target.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
dbus-timer.c tree-wide: add FORMAT_TIMESPAN() 2021-07-09 11:03:36 +02:00
dbus-timer.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
dbus-unit.c core: add StartUnitWithFlags DBUS method 2021-12-07 16:30:49 +01:00
dbus-unit.h core: add StartUnitWithFlags DBUS method 2021-12-07 16:30:49 +01:00
dbus-util.c alloc-util: add strdupa_safe() + strndupa_safe() and use it everywhere 2021-10-14 15:57:52 +02:00
dbus-util.h oom: rework *MemoryPressureLimit= properties to have 1/10000 precision 2021-02-02 17:52:48 -08:00
dbus.c shared: clean up mkdir.h/label.h situation 2021-11-16 17:03:28 +01:00
dbus.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
device.c tree-wide: check for NULLs in more places 2021-12-06 08:50:53 +09:00
device.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
dynamic-user.c shared: split out UID allocation range stuff from user-record.h 2021-11-13 08:10:11 +01:00
dynamic-user.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
efi-random.c basic/efivars: replace dynanamic creation of efivar names with static strings 2021-06-15 22:01:42 +02:00
efi-random.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
emergency-action.c Drop the text argument from assert_not_reached() 2021-08-03 10:05:10 +02:00
emergency-action.h tree-wide: use -EINVAL for enum invalid values 2021-02-10 14:46:59 +01:00
execute.c Merge pull request #21503 from poettering/ioprio-fix 2021-11-25 14:23:02 +09:00
execute.h exec: Add TTYRows and TTYColumns properties to set TTY dimensions 2021-11-05 21:32:14 +00:00
fuzz-unit-file.c core: split out core/manager-dump.[ch] 2021-06-02 09:22:08 +02:00
fuzz-unit-file.options fuzzers: move several fuzzers 2021-01-19 07:04:19 +09:00
generator-setup.c shared: clean up mkdir.h/label.h situation 2021-11-16 17:03:28 +01:00
generator-setup.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
ima-setup.c license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
ima-setup.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
job.c core: add StartUnitWithFlags DBUS method 2021-12-07 16:30:49 +01:00
job.h core: add StartUnitWithFlags DBUS method 2021-12-07 16:30:49 +01:00
kill.c license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
kill.h tree-wide: use -EINVAL for enum invalid values 2021-02-10 14:46:59 +01:00
kmod-setup.c kmod-setup: port from nftw() to recurse_dir() 2021-10-07 11:58:26 +02:00
kmod-setup.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
load-dropin.c conf-parse: make config_parse_many() optionally save 'struct stat' for each file 2021-10-27 19:49:55 +09:00
load-dropin.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
load-fragment-gperf-nulstr.awk tree-wide: add spdx header on all scripts and helpers 2021-01-28 09:55:35 +01:00
load-fragment-gperf.gperf.in path unit: add TriggerLimitBurst= and TriggerLimitIntervalSec= 2021-12-18 23:17:53 +00:00
load-fragment.c ioprio: normalize io priority values in configuration 2021-11-24 16:12:15 +01:00
load-fragment.h Merge pull request #20813 from unusual-thoughts/exittype_v2 2021-11-08 15:06:37 +01:00
locale-setup.c Add implicit sentinel to strv_env_merge() 2021-08-11 09:11:42 +02:00
locale-setup.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
main.c shared: clean up mkdir.h/label.h situation 2021-11-16 17:03:28 +01:00
manager-dump.c tree-wide: add FORMAT_TIMESPAN() 2021-07-09 11:03:36 +02:00
manager-dump.h core: split out core/manager-dump.[ch] 2021-06-02 09:22:08 +02:00
manager-serialize.c core: split out manager-serialize.[ch] 2021-07-19 11:27:11 +02:00
manager-serialize.h core: split out manager-serialize.[ch] 2021-07-19 11:27:11 +02:00
manager.c manager: always close idle pipe when sending ready notification 2022-01-04 16:18:55 +01:00
manager.h Merge pull request #20476 from jamacku/new-feature-reloaded-stamp 2021-12-07 18:47:25 +01:00
meson.build meson: stop building out convenience libraries by default 2021-12-16 11:01:08 +01:00
mount.c Merge pull request #20598 from tomty89/order_noauto 2021-12-11 14:06:38 +01:00
mount.h tree-wide: use -EINVAL for enum invalid values 2021-02-10 14:46:59 +01:00
namespace.c namespace: allow overriding /run with a TemporaryFileSystem= 2021-12-11 15:57:42 +01:00
namespace.h core: make DynamicUser=1 and StateDirectory= work with TemporaryFileSystem=/var/lib 2021-10-27 22:45:26 +01:00
org.freedesktop.systemd1.conf pid1: add DBUS method to mount image inside a running service namespace 2021-01-21 18:37:00 +00:00
org.freedesktop.systemd1.policy.in meson: use jinja2 for various files in src/core/ 2021-05-19 10:25:26 +09:00
org.freedesktop.systemd1.service license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
path.c path unit: add TriggerLimitBurst= and TriggerLimitIntervalSec= 2021-12-18 23:17:53 +00:00
path.h core: Add trigger limit for path units 2021-12-18 11:26:25 +01:00
restrict-ifaces.c bpf: refactor skeleton generation 2021-12-07 18:37:17 +01:00
restrict-ifaces.h tree-wide: fix SPDX short identifier for LGPL-2.1-or-later 2021-10-01 17:27:34 +01:00
scope.c scope: refuse activation of scopes if no PIDs to add are left 2021-10-27 23:17:50 +02:00
scope.h core: implement RuntimeMaxDeltaSec directive 2021-09-28 16:46:20 +02:00
selinux-access.c selinux: name mac_selinux_generic_access_check as internal function 2021-11-20 16:38:03 +00:00
selinux-access.h selinux: name mac_selinux_generic_access_check as internal function 2021-11-20 16:38:03 +00:00
selinux-setup.c tree-wide: add FORMAT_TIMESPAN() 2021-07-09 11:03:36 +02:00
selinux-setup.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
service.c socket: always pass socket, fd and SocketPeer ownership to service together 2021-11-25 00:05:03 +01:00
service.h socket: always pass socket, fd and SocketPeer ownership to service together 2021-11-25 00:05:03 +01:00
show-status.c core: add combined status unit format 2021-06-28 20:11:52 +02:00
show-status.h core: add combined status unit format 2021-06-28 20:11:52 +02:00
slice.c core: add default descriptions for slices 2021-06-30 13:25:16 +02:00
slice.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
smack-setup.c Define FOREACH_DIRENT through FOREACH_DIRENT_ALL 2021-12-15 22:50:00 +01:00
smack-setup.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
socket.c Revert "core: Propagate condition failed state to triggering units." 2021-12-17 19:39:29 +01:00
socket.h Revert "core: Propagate condition failed state to triggering units." 2021-12-17 19:39:29 +01:00
swap.c tree-wide: check for NULLs in more places 2021-12-06 08:50:53 +09:00
swap.h tree-wide: use -EINVAL for enum invalid values 2021-02-10 14:46:59 +01:00
system.conf.in core: allow "off" as special watchdog time to be specified 2021-10-13 13:10:34 +02:00
systemd.pc.in meson: use jinja2 for various files in src/core/ 2021-05-19 10:25:26 +09:00
target.c core: check for NULL in one more place 2021-12-06 17:45:20 +01:00
target.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
timer.c Revert "core: Propagate condition failed state to triggering units." 2021-12-17 19:39:29 +01:00
timer.h Revert "core: Propagate condition failed state to triggering units." 2021-12-17 19:39:29 +01:00
transaction.c core: rework unit printing and implement 'combined' format 2021-06-30 13:23:55 +02:00
transaction.h license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
unit-dependency-atom.c core: change BoundBy= dependency handling to be processed by a deferred work queue 2021-05-25 16:03:03 +02:00
unit-dependency-atom.h core: change BoundBy= dependency handling to be processed by a deferred work queue 2021-05-25 16:03:03 +02:00
unit-printf.c tree-wide: make specifier expansion --root= aware 2021-06-24 22:30:14 +02:00
unit-printf.h tree-wide: refuse too long strings earlier in specifier_printf() 2021-05-12 10:26:07 +09:00
unit-serialize.c core: replace slice dependencies as they get added 2021-11-10 10:52:08 +01:00
unit-serialize.h core: split out a few funcs into unit-serialize.[ch] 2021-02-12 11:36:24 +01:00
unit.c Revert "core: Propagate condition failed state to triggering units." 2021-12-17 19:39:29 +01:00
unit.h Revert "core: Propagate condition failed state to triggering units." 2021-12-17 19:39:29 +01:00
user.conf.in meson: use jinja2 for various files in src/core/ 2021-05-19 10:25:26 +09:00