Skip to content

Commit

Permalink
fix(registry-mock): kill the parent nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
KSXGitHub committed Nov 16, 2023
1 parent 8ee89ca commit 14df652
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/registry-mock/src/kill_verdaccio.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use pipe_trait::Pipe;
use std::iter;
use sysinfo::{
Pid, Process, ProcessExt, ProcessRefreshKind, RefreshKind, Signal, System, SystemExt,
};
Expand All @@ -13,7 +14,7 @@ pub fn kill_verdaccio_recursive_by_process(process: &Process, signal: Signal) ->
0
}
};
process.tasks.values().map(kill).sum()
process.tasks.values().chain(iter::once(process)).map(kill).sum()
}

pub fn kill_verdaccio_recursive_by_pid_in(system: &System, pid: Pid, signal: Signal) -> u64 {
Expand Down

0 comments on commit 14df652

Please sign in to comment.