Skip to content

Commit ef21b89

Browse files
LukeButtersclaude
andcommitted
Drop stale CREATE_BREAKAWAY_FROM_JOB comment
The header comment was left over from an earlier iteration that tried to detach the grandchild via CREATE_BREAKAWAY_FROM_JOB. The script only passes CREATE_NO_WINDOW (0x08000000); what actually makes Kill(true) miss the grandchild is the PPID chain breaking when cmd exits after `start /b` returns. The comment lower down already describes this correctly, so drop the stale header. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d252c36 commit ef21b89

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

‎source/Octopus.Tentacle.Tests.Integration/Util/SilentProcessRunnerFixture.cs‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,7 @@ public void CancellationToken_ShouldForceKillTheProcess()
125125
[WindowsTest]
126126
public async Task CancellationToken_WhenGrandchildHoldsRedirectedPipes_ShouldNotHang()
127127
{
128-
// Reproduces a dump scenario: a child process spawns a grandchild that
129-
// inherits the redirected stdout/stderr handles AND is detached from the
130-
// .NET-managed job (CREATE_BREAKAWAY_FROM_JOB). When cancellation fires:
131-
// - Hitman.Kill terminates the immediate child.
132-
// - The grandchild survives and keeps the write-end of the pipes open.
133-
// - Process.WaitForExit() blocks forever waiting for the readers to EOF.
134-
// The fix is to close StandardOutput/StandardError after Kill so the
135-
// readers see EOF on our end and WaitForExit returns.
136-
137128
var grandchildPidFile = Path.Combine(Path.GetTempPath(), $"silent-runner-grandchild-{Guid.NewGuid():N}.pid");
138-
139129
var diagnosticsFile = grandchildPidFile + ".log";
140130

141131
// Reproduces the dump pattern (PowerShell -> AutoReport -> AutoReport-child):

0 commit comments

Comments
 (0)