process-util: ensure pidref_is_alive only return ESRCH if not set

This commit is contained in:
Mike Yuan
2024-01-04 16:19:20 +08:00
parent fdbb56dc1f
commit faf0dd4b29
+3 -1
View File
@@ -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)