summaryrefslogtreecommitdiffstats
path: root/src/basic/process-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-03-17 18:43:42 +0100
committerLennart Poettering <lennart@poettering.net>2021-03-17 18:43:42 +0100
commit627055ce9ae66a637aa2b3eec876620aec80c705 (patch)
treed511dca13de9b884a4f2ff693d7377f940b9931b /src/basic/process-util.c
parentupdate TODO (diff)
downloadsystemd-627055ce9ae66a637aa2b3eec876620aec80c705.tar.xz
systemd-627055ce9ae66a637aa2b3eec876620aec80c705.zip
tree-wide: use read_full_virtual_file() where appropriate
Wherever we read virtual files we better should use read_full_virtual_file(), to make sure we get a consistent response given how weird the kernel's handling with partial read on such file systems is.
Diffstat (limited to 'src/basic/process-util.c')
-rw-r--r--src/basic/process-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/process-util.c b/src/basic/process-util.c
index d3eb3ad18b..eb257144f0 100644
--- a/src/basic/process-util.c
+++ b/src/basic/process-util.c
@@ -1548,7 +1548,7 @@ int pidfd_get_pid(int fd, pid_t *ret) {
xsprintf(path, "/proc/self/fdinfo/%i", fd);
- r = read_full_file(path, &fdinfo, NULL);
+ r = read_full_virtual_file(path, &fdinfo, NULL);
if (r == -ENOENT) /* if fdinfo doesn't exist we assume the process does not exist */
return -ESRCH;
if (r < 0)