homed: make sure our worker processes finish before we exit
authorLennart Poettering <lennart@poettering.net>
Fri, 18 Sep 2020 16:53:12 +0000 (18:53 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 20 Sep 2020 10:09:59 +0000 (12:09 +0200)
commite1df274a76832d3b25a284a92790c5b85a1a88a7
treec2377dfe95ad9229132c89b9dffde75d516f81ce
parentf2763ff6cd9385e82171e17ed83a7698c7f561fd
homed: make sure our worker processes finish before we exit

When exiting, let's explicitly wait for our worker processes to finish
first. That's useful if unmounting of /home/ is scheduled to happen
right after homed is down, as we then can be sure that the home
directories are properly unmounted and detached by the time homed is
fully terminated (otherwise it might happen that our worker gets killed
by the service manager, thus leaving the home directory and its backing
devices up/left for auto-clean which might be async).

Likely fixes #16842

(cherry picked from commit 9796a9fbad5bae4d66bb40d848f6245d1ee327d8)
src/home/homed-home.c
src/home/homed-home.h
src/home/homed-manager.c