summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Lisov <dennis.lissov@gmail.com>2022-05-02 18:55:12 +0300
committerBenBE <BenBE@geshi.org>2022-05-05 10:00:34 +0200
commitfae7ff6f030d65bbb656028941c9254b214533a4 (patch)
treeccfd5739388c346d5590d7ac1aa871c19bd501d8
parente07fce701433f79f925eef66508d1ada53ce5d53 (diff)
LinuxProcessList_recurseProcTree: keep on read error
If a process goes away while reading its fields, but we already have that process in the list, we should keep it in case the "highlight dying processes" mode is active. Not only is that expected in this mode, but this should also ensure parents are in the list when their children are (wanted for tree mode consistency).
-rw-r--r--linux/LinuxProcessList.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c
index 0d4be558..14f3824a 100644
--- a/linux/LinuxProcessList.c
+++ b/linux/LinuxProcessList.c
@@ -1653,8 +1653,13 @@ errorReadingProcess:
#endif
if (preExisting) {
- ProcessList_remove(pl, proc);
+ /*
+ * The only real reason for coming here (apart from Linux violating the /proc API)
+ * would be the process going away with its /proc files disappearing (!HAVE_OPENAT).
+ * However, we want to keep in the process list for now for the "highlight dying" mode.
+ */
} else {
+ /* A really short-lived process that we don't have full info about */
Process_delete((Object*)proc);
}
}

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