Browse Source

perf: remove unused sysinfo monitor

tags/v0.3.12-rc0
mivik 8 months ago
parent
commit
6ba2d611f6
No known key found for this signature in database GPG Key ID: E8BDA67F6781E57D
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      binaries/daemon/src/lib.rs

+ 3
- 2
binaries/daemon/src/lib.rs View File

@@ -1796,10 +1796,11 @@ impl ProcessId {

pub fn kill(&mut self) -> bool {
if let Some(pid) = self.0 {
let pid = Pid::from(pid as usize);
let mut system = sysinfo::System::new();
system.refresh_processes();
system.refresh_process(pid);

if let Some(process) = system.process(Pid::from(pid as usize)) {
if let Some(process) = system.process(pid) {
process.kill();
self.mark_as_stopped();
return true;


Loading…
Cancel
Save