Fix Windows job breakaway for detached DCP processes - #232
Merged
Karol Zadora-Przylecki (karolz-ms) merged 1 commit intoAug 12, 2026
Merged
Conversation
Query the current process job before adding CREATE_BREAKAWAY_FROM_JOB, and cover the behavior with a Windows job-object regression test. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: cd8de039-355b-420e-b760-fa6bd6239120
David Negstad (danegsta)
requested review from
Karol Zadora-Przylecki (karolz-ms)
and
a balanced review from Copilot
August 12, 2026 02:22
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes Windows detached DCP processes being terminated with Aspire’s CLI job, addressing cleanup failures related to microsoft/aspire#19250.
Changes:
- Queries the current process’s immediate Windows job for breakaway permission.
- Adds a regression test validating
CREATE_BREAKAWAY_FROM_JOB.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
pkg/process/process_util_windows.go |
Detects breakaway permission on the current job. |
pkg/process/process_windows_test.go |
Tests breakaway flag configuration using a helper process. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Member
Author
|
Tested a local build with the latest 13.5.0 staging CLI build and confirmed it resolved the issue. |
Karol Zadora-Przylecki (karolz-ms)
approved these changes
Aug 12, 2026
Karol Zadora-Przylecki (karolz-ms)
deleted the
danegsta-fix-detached-job-breakaway
branch
August 12, 2026 03:50
Collaborator
|
/backport to release/0.25 |
|
Started backporting to release/0.25: https://github.com/microsoft/dcp/actions/runs/31561382278 |
|
Karol Zadora-Przylecki (@karolz-ms) backport PR couldn't be created automatically, please create the backport PR manually! |
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.
Detached DCP servers launched by Aspire on Windows inherit the CLI's
KILL_ON_JOB_CLOSEjob. When the CLI exits, Windows can terminate DCP before parent-monitor cleanup runs, leaving session resources behind.This change queries the current process's immediate job instead of a newly created empty job, then applies
CREATE_BREAKAWAY_FROM_JOBwhen that job permits breakaway. A Windows regression test assigns a helper process to aBREAKAWAY_OKjob and verifies that detached children receive the breakaway creation flag.Testing
make testmake lintRelated: microsoft/aspire#19250