summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-11-29 12:46:25 +0100
committerChristian Göttsche <cgzones@googlemail.com>2020-11-29 12:46:25 +0100
commit9549ca8c8802f1242614dd1f897a05a66570acf4 (patch)
tree3b11daaa785268735b06235770a004e84425bcc6
parent5ee6875f73463bbf9f2a785165a430489337465b (diff)
Linux: fix process parsing for hidden pid directories
-rw-r--r--linux/LinuxProcessList.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c
index 9c51a580..b8d794a5 100644
--- a/linux/LinuxProcessList.c
+++ b/linux/LinuxProcessList.c
@@ -1330,12 +1330,12 @@ static bool LinuxProcessList_recurseProcTree(LinuxProcessList* this, openat_arg_
proc->tgid = parent ? parent->pid : pid;
#ifdef HAVE_OPENAT
- int procFd = openat(dirFd, name, O_PATH | O_DIRECTORY | O_NOFOLLOW);
+ int procFd = openat(dirFd, entry->d_name, O_PATH | O_DIRECTORY | O_NOFOLLOW);
if (procFd < 0)
goto errorReadingProcess;
#else
char procFd[4096];
- xSnprintf(procFd, sizeof(procFd), "%s/%s", dirFd, name);
+ xSnprintf(procFd, sizeof(procFd), "%s/%s", dirFd, entry->d_name);
#endif
LinuxProcessList_recurseProcTree(this, procFd, "task", proc, period, now);

© 2014-2024 Faster IT GmbH | imprint | privacy policy