core: reload cache if it's dirty when starting a UNIT_NOT_FOUND unit
authorLuca Boccassi <luca.boccassi@microsoft.com>
Thu, 7 May 2020 22:26:53 +0000 (23:26 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 30 May 2020 14:50:05 +0000 (16:50 +0200)
commitd904afc730268d50502f764dfd55b8cf4906c46f
treeab7d37d0c0f67abe055e0f30d7f348c2f5ea9efa
parent956508cb5db4e3ba94a916632ad2be272010d63d
core: reload cache if it's dirty when starting a UNIT_NOT_FOUND unit

The time-based cache allows starting a new unit without an expensive
daemon-reload, unless there was already a reference to it because of
a dependency or ordering from another unit.
If the cache is out of date, check again if we can load the
fragment.
src/core/manager.c
src/shared/unit-file.c
src/shared/unit-file.h
test/TEST-48-START-STOP-NO-RELOAD/Makefile [new symlink]
test/TEST-48-START-STOP-NO-RELOAD/test.sh [new file with mode: 0755]
test/units/testsuite-48.service [new file with mode: 0644]
test/units/testsuite-48.sh [new file with mode: 0755]