+/* SPDX-License-Identifier: LGPL-2.1+ */
/***
This file is part of systemd.
assert(field);
assert(uid);
- if (!pid_is_valid(pid))
+ if (pid < 0)
return -EINVAL;
p = procfs_file_alloca(pid, "status");
bool pid_is_unwaited(pid_t pid) {
/* Checks whether a PID is still valid at all, including a zombie */
- if (!pid_is_valid(pid))
+ if (pid < 0)
return false;
if (pid <= 1) /* If we or PID 1 would be dead and have been waited for, this code would not be running */
/* Checks whether a PID is still valid and not a zombie */
- if (!pid_is_valid(pid))
+ if (pid < 0)
return false;
if (pid <= 1) /* If we or PID 1 would be a zombie, this code would not be running */
int pid_from_same_root_fs(pid_t pid) {
const char *root;
- if (!pid_is_valid(pid))
+ if (pid < 0)
return false;
if (pid == 0 || pid == getpid_cached())