Skip to content

Commit

Permalink
Fix forget_grandchild retain condition
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Michaelis <code@mgjm.de>
  • Loading branch information
mgjm committed Jul 12, 2023
1 parent f132a00 commit 94787b5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions conmon-rs/server/src/child_reaper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,7 @@ impl ChildReaper {
locked_grandchildren: &Arc<Mutex<MultiMap<String, ReapableChild>>>,
grandchild_pid: u32,
) -> Result<()> {
let mut map = lock!(locked_grandchildren);
map.retain(|_, v| v.pid == grandchild_pid);
lock!(locked_grandchildren).retain(|_, v| v.pid != grandchild_pid);
Ok(())
}

Expand Down

0 comments on commit 94787b5

Please sign in to comment.