Add atexit cleanup via worker process to kittens infrastructure

This commit is contained in:
Kovid Goyal
2025-09-30 11:52:13 +05:30
parent 4f9519d773
commit 190e3e5891
2 changed files with 72 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ import (
)
func KittenMain(args ...string) int {
defer utils.WaitForAtexitWorkerToFinish()
krm := os.Getenv("KITTY_KITTEN_RUN_MODULE")
os.Unsetenv("KITTY_KITTEN_RUN_MODULE")
switch krm {