pidof: See through deleted links

This commit is contained in:
Ryan Houdek committed 2026-01-04 17:28:59 -08:00
1 parent 69eddaebbf
commit 3005abc3aa
1 file changed
+5
+5
View File
@@ -180,6 +180,11 @@ static void IteratePids() {
std::error_code ec;
std::string exe_link = std::filesystem::read_symlink(ExePath, ec);
auto deleted_pos = exe_link.find(" (deleted)");
if (deleted_pos != std::string::npos) {
exe_link = exe_link.substr(0, deleted_pos);
}
// Couldn't read exe path? skip.
if (ec) {
continue;