mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
ProcessRegistry::cleanup sent SIGKILL to a test's process group and returned at once. SIGKILL is asynchronous, so a killed process could still hold its boot listener socket when the next test started, causing an EADDRINUSE bind failure. Reap the group after the signal and wait for it to exit before returning. Return an error if it does not exit within the timeout so a caller can react to a guest that survived cleanup. Since cleanup now reaps the whole group, the unit tests drop their Child handles without waiting. They carry expect(clippy::zombie_processes), since cleanup already reaps them. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>