Skip to content

Commit

Permalink
Merge pull request #1505 from mgjm-fork/forget-grandchild-retain-cond…
Browse files Browse the repository at this point in the history
…ition

Fix forget_grandchild retain condition
  • Loading branch information
openshift-merge-robot authored Jul 12, 2023
2 parents 03b7321 + 94787b5 commit 4d31e73
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 4d31e73

Please sign in to comment.