Browse Source

First fix for slowess in fnm env (#576)

remotes/origin/add-with-shims
Gal Schlezinger 3 years ago committed by GitHub
parent
commit
8bd33dc1b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/shell/infer/mod.rs

6
src/shell/infer/mod.rs

@ -10,12 +10,12 @@ struct ProcessInfo { @@ -10,12 +10,12 @@ struct ProcessInfo {
}
pub fn infer_shell() -> Option<Box<dyn Shell>> {
let system = System::new_all();
let hashmap = system.processes();
let mut system = System::new();
let mut current_pid = sysinfo::get_current_pid().ok();
while let Some(pid) = current_pid {
if let Some(process) = hashmap.get(&pid) {
system.refresh_process(pid);
if let Some(process) = system.process(pid) {
current_pid = process.parent();
let process_name = process
.exe()

Loading…
Cancel
Save