]> git.ipfire.org Git - thirdparty/systemd.git/commit
shared/killall: correctly warn about rootfs daemon's root
authorMike Yuan <me@yhndnzj.com>
Sat, 2 Dec 2023 07:23:51 +0000 (15:23 +0800)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 6 Dec 2023 21:03:35 +0000 (22:03 +0100)
commit374c29fc883846477e2db7e77af13068b0fb177a
treee97bca982398e28d444b856d35faf6f60327b8ed
parentb28940ca10ff1223f42a9ffdf8acfa92eeb443a7
shared/killall: correctly warn about rootfs daemon's root

Follow-up for 9e615117dab5ede72eec22bf6369e0138f9dace5

We'll typically send signals to all remaining processes in the following
cases:

1. pid1 (in initrd) when transitioning from initrd to sysroot: SIGTERM
2. pid1 (in sysroot) before transitioning back to initrd (exitrd): SIGTERM + SIGKILL
3. systemd-shutdown (in exitrd): SIGTERM + SIGKILL

'warn_rootfs' is set to true only when we're not in initrd and we're
sending SIGKILL, which means the second case. So, we want to emit the
warning when the root of the storage daemon IS the same as that of pid1,
rather than the other way around.

The condition is spuriously reversed in the offending commit.
src/shared/killall.c