Skip to content

Fix Host cleanup to avoid kill(0) and track target PID correctly#8

Open
ConnorNelson wants to merge 2 commits intomasterfrom
fix/avoid-kill-zero
Open

Fix Host cleanup to avoid kill(0) and track target PID correctly#8
ConnorNelson wants to merge 2 commits intomasterfrom
fix/avoid-kill-zero

Conversation

@ConnorNelson
Copy link
Member

@ConnorNelson ConnorNelson commented Feb 25, 2026

Summary

  • store child PID in shared host_target_pids via .value instead of overwriting the Value wrapper
  • guard cleanup signals so we only signal valid PIDs (> 1)
  • only send the hard-kill to host_target_pids when NS.PID is enabled

Why
Network hosts can run without NS.PID, leaving host_target_pids[...] at 0. The prior unconditional os.kill(host_target_pids[..].value, 9) can become kill(0, SIGKILL), which kills the current process group and can tear down the whole container under kata.

This change keeps cleanup behavior for PID-namespace hosts but prevents accidental process-group kills.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant