mirror of
https://github.com/xzeldon/htop.git
synced 2025-01-31 00:57:24 +03:00
e07fce7014
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.