fix(cli): detach Windows daemons from caller pipes and jobs - #282
Merged
Merged
Conversation
Use an explicit standard-handle inheritance list for daemon startup and the Windows update helper. Require and verify breakaway before resuming a background daemon, with an actionable error for restrictive host Jobs. Share direct startup and its readiness deadline across explicit and automatic entry points, retain child ownership through startup, and reap Unix children after handoff. Add native Windows EOF, Job lifetime, concurrency and failure regressions to CI, and document persistent host setup. Refs #268
Do not terminate a running child when its launcher cannot confirm startup. A different client may already be using it, or publication may race the launcher's deadline. Retain cleanup only before a Windows child resumes. Add deterministic lifecycle regressions for reuse before timeout, delayed publication and port mismatch. Run Windows success-path and updater tests in a same-user WMI test host that verifies it is outside all Jobs, and keep restricted-host rejection tests in the normal CI runner. Refs #268
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Windows background startup can leave captured stdout/stderr open after the launcher exits, and the daemon can die when the host cleans up its Job Object. This change isolates inherited handles, verifies that background daemons are independent of host Jobs, and keeps a launcher's wait deadline separate from shared daemon lifetime.
Validation before this update was committed:
status, process exit and both pipe EOF checks executed in every round; no cold-start case was skipped.GitHub verification: CI run 35455639169 passed on commit
58eb44b. The independent Windows host verifiedinJob=Falseand executed all 10 startup tests, 9 launcher lifecycle tests and 3 updater tests successfully. The ordinary Windows runner also passed restricted-Job rejection, cancellation and both PowerShell installer suites. The only ignored tests are subprocess entry points; the default-port cold-start case executed successfully.Addresses the Windows pipe and Job lifetime failures in #268. Query commands retain their automatic-start defaults;
BSK_AUTO_START=0remains the opt-out. Changing those defaults is outside this change.