mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 08:25:20 +09:00
shared/killall: correctly warn about rootfs daemon's root
Follow-up for 9e615117da
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.
This commit is contained in:
@@ -101,7 +101,7 @@ static bool ignore_proc(const PidRef *pid, bool warn_rootfs) {
|
||||
return false;
|
||||
|
||||
if (warn_rootfs &&
|
||||
pid_from_same_root_fs(pid->pid) == 0) {
|
||||
pid_from_same_root_fs(pid->pid) > 0) {
|
||||
|
||||
_cleanup_free_ char *comm = NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user