Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LinuxProcessList_recurseProcTree: open dirfd first
A process can die between reading the directory listing and opening the directory FD (if HAVE_OPENAT) or /proc files (otherwise) for reading the process data. This race would cause LinuxProcessList_recurseProcTree to remove it from the list immediately, which is unexpected in the "highlight dying processes" mode and can break the tree structure. This patch closes this race in the HAVE_OPENAT case by only accessing the process entry after the directory FD has been opened.
- Loading branch information