Skip to main content

HardKillCocoon

Function HardKillCocoon 

Source
pub async fn HardKillCocoon()
Expand description

Atom I6: post-shutdown hard-kill. Called by RuntimeShutdown after the $shutdown gRPC notification has been sent (and either succeeded or timed out). Grabs the stored Child handle and force-terminates it if still alive, then resets COCOON_STATE. This plugs the “Mountain exits cleanly but child stays running” leak that leads to zombie-Cocoon zombies holding the gRPC port.

Call AFTER the graceful $shutdown attempt - we don’t want to race the child’s own cleanup. Safe to call with no stored child (no-op).