Systemd/src/core
Lennart Poettering a3c1168ac2 core: rework StopWhenUnneeded= logic
Previously, we'd act immediately on StopWhenUnneeded= when a unit state
changes. With this rework we'll maintain a queue instead: whenever
there's the chance that StopWhenUneeded= might have an effect we enqueue
the unit, and process it later when we have nothing better to do.

This should make the implementation a bit more reliable, as the unit notify event
cannot immediately enqueue tons of side-effect jobs that might
contradict each other, but we do so only in a strictly ordered fashion,
from the main event loop.

This slightly changes the check when to consider a unit "unneeded".
Previously, we'd assume that a unit in "deactivating" state could also
be cleaned up. With this new logic we'll only consider units unneeded
that are fully up and have no job queued. This means that whenever
there's something pending for a unit we won't clean it up.
2018-08-10 16:19:01 +02:00
..
all-units.h core: undo the dependency inversion between unit.h and all unit types 2018-05-15 14:24:34 -04:00
audit-fd.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
audit-fd.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
automount.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
automount.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
bpf-firewall.c tree-wide: drop empty lines in comments 2018-07-23 08:44:24 +02:00
bpf-firewall.h tree-wide: drop double newline 2018-06-29 11:02:17 +09:00
cgroup.c core: introduce cgroup_add_device_allow() 2018-08-06 13:42:14 +09:00
cgroup.h core: introduce cgroup_add_device_allow() 2018-08-06 13:42:14 +09:00
chown-recursive.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
chown-recursive.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-automount.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-automount.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-cgroup.c core: add MemoryMin 2018-07-12 08:21:43 +02:00
dbus-cgroup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-device.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-device.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-execute.c Add support for opening files for appending 2018-07-20 03:54:22 -07:00
dbus-execute.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-job.c tree-wide: use "polkit" to refer to PolicyKit/polkit 2018-07-16 12:44:24 +02:00
dbus-job.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-kill.c Make final kill signal configurable 2018-07-23 13:44:54 +02:00
dbus-kill.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-manager.c tree-wide: shorten error logging a bit 2018-08-07 10:14:33 +09:00
dbus-manager.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-mount.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-mount.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-path.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-path.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-scope.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-scope.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-service.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-service.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-slice.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-slice.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-socket.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-socket.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-swap.c tree-wide: beautify remaining copyright statements 2018-06-14 10:20:21 +02:00
dbus-swap.h tree-wide: beautify remaining copyright statements 2018-06-14 10:20:21 +02:00
dbus-target.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-target.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-timer.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-timer.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-unit.c core: Fix grammar in error message 2018-07-11 12:38:36 +02:00
dbus-unit.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-util.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus-util.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dbus.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
device.c core: explicitly trigger changing udev SYSTEMD_WANTS properties 2018-06-20 23:59:29 +02:00
device.h core: explicitly trigger changing udev SYSTEMD_WANTS properties 2018-06-20 23:59:29 +02:00
dynamic-user.c core: fix gid when DynamicUser=yes with static User= 2018-07-26 15:38:18 +09:00
dynamic-user.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
emergency-action.c Drop more copyright headers 2018-07-24 14:40:38 +02:00
emergency-action.h Drop more copyright headers 2018-07-24 14:40:38 +02:00
execute.c core/execute: fix dump format for Limit*= 2018-08-10 11:59:16 +02:00
execute.h Merge pull request #9624 from poettering/service-state-flush 2018-08-02 09:50:39 +02:00
hostname-setup.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
hostname-setup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
ima-setup.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
ima-setup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
ip-address-access.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
ip-address-access.h tree-wide: drop double newline 2018-06-29 11:02:17 +09:00
job.c tree-wide: drop empty lines in comments 2018-07-23 08:44:24 +02:00
job.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
kill.c Make final kill signal configurable 2018-07-23 13:44:54 +02:00
kill.h Make final kill signal configurable 2018-07-23 13:44:54 +02:00
killall.c tree-wide: beautify remaining copyright statements 2018-06-14 10:20:21 +02:00
killall.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
kmod-setup.c core: use the generic module_load() function 2018-07-19 18:28:21 +02:00
kmod-setup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
load-dropin.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
load-dropin.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
load-fragment-gperf-nulstr.awk build-sys: fix the script used for generating load_fragment_gperf_nulstr (#6646) 2017-08-26 23:21:23 +09:00
load-fragment-gperf.gperf.m4 Make final kill signal configurable 2018-07-23 13:44:54 +02:00
load-fragment.c core: introduce cgroup_add_device_allow() 2018-08-06 13:42:14 +09:00
load-fragment.h Make final kill signal configurable 2018-07-23 13:44:54 +02:00
locale-setup.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
locale-setup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
loopback-setup.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
loopback-setup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
machine-id-setup.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
machine-id-setup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
macros.systemd.in Merge pull request #9489 from keszybz/copyright-removal-3 2018-07-03 16:55:01 +02:00
main.c core/main: use return log_*_errno more 2018-07-25 14:48:07 +02:00
manager.c core: rework StopWhenUnneeded= logic 2018-08-10 16:19:01 +02:00
manager.h core: rework StopWhenUnneeded= logic 2018-08-10 16:19:01 +02:00
meson.build Drop my copyright headers 2018-06-14 13:03:20 +02:00
mount-setup.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
mount-setup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
mount.c tree-wide: use returned value from log_*_errno() 2018-08-07 15:48:37 +09:00
mount.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
namespace.c core/namespace: add more log messages 2018-08-10 14:30:35 +09:00
namespace.h namespace: drop protect_{home,system}_or_bool_from_string() 2018-06-15 11:32:27 +02:00
org.freedesktop.systemd1.conf systemd-analyze: make dump work for large # of units 2018-05-11 08:11:02 -07:00
org.freedesktop.systemd1.policy.in core: systemd1.manage-unit-files policy implies systemd1.manage-units 2018-05-18 00:02:58 +09:00
org.freedesktop.systemd1.service Add SPDX license headers to various assorted files 2017-11-19 19:08:15 +01:00
path.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
path.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
scope.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
scope.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
selinux-access.c tree-wide: drop copyright lines for more authors 2018-06-22 16:39:45 +02:00
selinux-access.h tree-wide: drop double newline 2018-06-29 11:02:17 +09:00
selinux-setup.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
selinux-setup.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
service.c Merge pull request #9624 from poettering/service-state-flush 2018-08-02 09:50:39 +02:00
service.h core: introduce new Type=exec service type 2018-07-25 22:48:11 +02:00
show-status.c core: serialize and deserialize current ShowStatus 2018-07-23 23:42:48 +09:00
show-status.h core: serialize and deserialize current ShowStatus 2018-07-23 23:42:48 +09:00
shutdown.c tree-wide: beautify remaining copyright statements 2018-06-14 10:20:21 +02:00
slice.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
slice.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
smack-setup.c tree-wide: use proper unicode © instead of (C) where we can 2018-06-14 10:20:20 +02:00
smack-setup.h tree-wide: use proper unicode © instead of (C) where we can 2018-06-14 10:20:20 +02:00
socket.c tree-wide: Convert compare_func's to use CMP() macro wherever possible. 2018-08-06 19:26:35 -07:00
socket.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
swap.c Merge pull request #9624 from poettering/service-state-flush 2018-08-02 09:50:39 +02:00
swap.h tree-wide: beautify remaining copyright statements 2018-06-14 10:20:21 +02:00
system.conf.in core: add missing option and drop nonexistent option in system.conf 2018-06-26 04:07:19 +09:00
systemd.pc.in build-sys: make the dynamic UID range, and the container UID range configurable 2017-12-06 12:55:37 +01:00
target.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
target.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
timer.c tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
timer.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
transaction.c tree-wide: shorten error logging a bit 2018-08-07 10:14:33 +09:00
transaction.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
triggers.systemd.in Drop my copyright headers 2018-06-14 13:03:20 +02:00
umount.c tree-wide: beautify remaining copyright statements 2018-06-14 10:20:21 +02:00
umount.h tree-wide: beautify remaining copyright statements 2018-06-14 10:20:21 +02:00
unit-printf.c core: add unit specifier for configuration directory root 2018-06-21 03:20:37 +09:00
unit-printf.h tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
unit.c core: rework StopWhenUnneeded= logic 2018-08-10 16:19:01 +02:00
unit.h core: rework StopWhenUnneeded= logic 2018-08-10 16:19:01 +02:00
user.conf core: rename StartLimitInterval= to StartLimitIntervalSec= 2016-04-29 16:27:48 +02:00