Skip to content

Commit

Permalink
fix: disable killing nested processes
Browse files Browse the repository at this point in the history
Depth to zero for now to prevent killing parent processes
  • Loading branch information
jacobtread committed May 23, 2024
1 parent 0689a07 commit 64d2e5a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ impl ProcessLookupTable {
/// WARNING - This worked in the previous versions because the implementation
/// was flawwed and didn't properly look up the tree of parents, trying to kill
/// all of the parents causes problems since you'll end up killing explorer.exe
/// or some other windows sys process. So I've limited the depth to a single process deep
/// or some other windows sys process. This has been disabled (Depth of 0) but
/// may be enabled in a future release
///
///
///
/// # Arguments
///
Expand All @@ -171,7 +174,7 @@ fn lookup_process_parents(
lookup_table: &ProcessLookupTable,
process: &mut WindowsProcess,
) -> Result<()> {
const MAX_PARENT_DEPTH: u8 = 1;
const MAX_PARENT_DEPTH: u8 = 0;

let mut current_procces = process;
let mut depth = 0;
Expand Down

0 comments on commit 64d2e5a

Please sign in to comment.