process-util: a process from a foreign pidns is definitely not our child

Addresses: https://github.com/systemd/systemd/pull/35242#pullrequestreview-2531712318
This commit is contained in:
Lennart Poettering
2025-01-06 17:19:34 +01:00
parent 62e9cd6b09
commit 9ed2725867

View File

@@ -1096,6 +1096,8 @@ int pidref_is_my_child(const PidRef *pid) {
pid_t ppid;
r = pidref_get_ppid(pid, &ppid);
if (r == -EADDRNOTAVAIL) /* if this process is outside of our pidns, it is definitely not our child */
return false;
if (r < 0)
return r;