Fix duplicate process entries in WSL debug attach list (#40591)
Closes #40589 Replaced `System::new_all()` with `System::new_with_specifics` to fetch only essential process information and exclude non-main threads from the process list after fix: <img width="641" height="474" alt="image" src="https://github.com/user-attachments/assets/32335552-2f7a-4317-8c01-f37b2eadfdc1" /> Release Notes: - Fix duplicate process entries in WSL debug attach list
This commit is contained in:
@@ -9,7 +9,7 @@ use task::ZedDebugConfig;
|
||||
use util::debug_panic;
|
||||
|
||||
use std::sync::Arc;
|
||||
use sysinfo::System;
|
||||
use sysinfo::{ProcessRefreshKind, RefreshKind, System, UpdateKind};
|
||||
use ui::{Context, Tooltip, prelude::*};
|
||||
use ui::{ListItem, ListItemSpacing};
|
||||
use workspace::{ModalView, Workspace};
|
||||
@@ -362,7 +362,12 @@ fn get_processes_for_project(project: &Entity<Project>, cx: &mut App) -> Task<Ar
|
||||
Arc::from(processes.into_boxed_slice())
|
||||
})
|
||||
} else {
|
||||
let mut processes: Box<[_]> = System::new_all()
|
||||
let refresh_kind = RefreshKind::nothing().with_processes(
|
||||
ProcessRefreshKind::nothing()
|
||||
.without_tasks()
|
||||
.with_cmd(UpdateKind::Always),
|
||||
);
|
||||
let mut processes: Box<[_]> = System::new_with_specifics(refresh_kind)
|
||||
.processes()
|
||||
.values()
|
||||
.map(|process| {
|
||||
|
||||
Reference in New Issue
Block a user