mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
Linux: fix process parsing for hidden pid directories
This commit is contained in:
parent
5ee6875f73
commit
9549ca8c88
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user