mirror of
https://github.com/systemd/systemd
synced 2024-07-22 18:55:10 +00:00
process-util: ensure pidref_is_alive only return ESRCH if not set
This commit is contained in:
parent
fdbb56dc1f
commit
faf0dd4b29
|
@ -1112,8 +1112,10 @@ int pidref_is_alive(const PidRef *pidref) {
|
||||||
return -ESRCH;
|
return -ESRCH;
|
||||||
|
|
||||||
result = pid_is_alive(pidref->pid);
|
result = pid_is_alive(pidref->pid);
|
||||||
if (result < 0)
|
if (result < 0) {
|
||||||
|
assert(result != -ESRCH);
|
||||||
return result;
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
r = pidref_verify(pidref);
|
r = pidref_verify(pidref);
|
||||||
if (r == -ESRCH)
|
if (r == -ESRCH)
|
||||||
|
|
Loading…
Reference in a new issue