Skip to content

Wait for a tool's child processes to exit before restarting - #49

Merged
kzu merged 1 commit into
mainfrom
dev/tree
Oct 26, 2026
Merged

kzu merged 1 commit into
mainfrom
dev/tree

Conversation

@kzu

@kzu kzu commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Summary

  • After a graceful close, record the processes the tool started and wait until they exit before the update starts the new build. Workers reparented by the OS are no longer left running.
  • A descendant that is already stopping is given the stop timeout to finish. It is killed only if it is still alive when that wait ends.
  • Cover the path with a simulated CodeAlta update, and an opt-in run against a Release build of CodeAlta (NDX_CODEALTA_E2E=1) that checks CODEALTA_AUTOMATED leads to ExitWhenIdle and exit code 0.

Test plan

  • dotnet test --filter FullyQualifiedName~CodeAltaEvergreenTests
  • NDX_CODEALTA_E2E=1 dotnet test --filter FullyQualifiedName~CodeAltaSourceEvergreenTests against the CodeAlta Release build: WM_CLOSE, log shows ExitWhenIdle, exit code 0, no alta process left
  • CI on this pull request

A graceful close lets the root exit while its workers are reparented, so killing that pid no longer reaches them.
@kzu
kzu enabled auto-merge (rebase) October 26, 2026 18:41
@kzu

kzu commented Oct 26, 2026

Copy link
Copy Markdown
Member Author

241 passed 241 passed

🧪 Details on Ubuntu 26.04.1 LTS

from retest v1.1.0 on .NET 10.0.14 with 💜 by @devlooped

@kzu
kzu merged commit 3c0e436 into main Oct 26, 2026
3 checks passed
@kzu
kzu deleted the dev/tree branch October 26, 2026 18:43
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