diff options
author | Mike Yuan <me@yhndnzj.com> | 2023-12-23 12:08:22 +0100 |
---|---|---|
committer | Mike Yuan <me@yhndnzj.com> | 2024-01-04 09:19:20 +0100 |
commit | faf0dd4b29139a1e702d3136dc37bdb033e45927 (patch) | |
tree | 00cd37e4196391a9eff5669603858d7f6c7c30e9 /src | |
parent | logind-session: use one_zero where appropriate (diff) | |
download | systemd-faf0dd4b29139a1e702d3136dc37bdb033e45927.tar.xz systemd-faf0dd4b29139a1e702d3136dc37bdb033e45927.zip |
process-util: ensure pidref_is_alive only return ESRCH if not set
Diffstat (limited to 'src')
-rw-r--r-- | src/basic/process-util.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/basic/process-util.c b/src/basic/process-util.c index 201c5596ae..cdfe33c1db 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c @@ -1112,8 +1112,10 @@ int pidref_is_alive(const PidRef *pidref) { return -ESRCH; result = pid_is_alive(pidref->pid); - if (result < 0) + if (result < 0) { + assert(result != -ESRCH); return result; + } r = pidref_verify(pidref); if (r == -ESRCH) |