Repository navigation
Start path: fall back on a setup failure, guard the output readers, warn once, report Version and StartMode - #65
Merged
Conversation
…e, report Version and StartMode - A Win32 error while setting up a start inside the Job Object (pipes, the attribute list, the job attribute) failed the start, where 3.1 only lost that program's force-kill cleanup. It now falls back to Process.Start plus Assign; a failure of CreateProcess itself still reports that the program couldn't start. - The output readers were built after the program was resumed, outside the guard: if one failed, the program ran on untracked. They're built inside the guard now, and a failure ends the still-suspended program. - Falling back (no usable start lock, or a setup failure) was silent. It now warns once per process, saying a child started straight away can escape the cleanup. - Initialize-ParallelKit also returns Version and StartMode (CreatedInJob, AddedToJob or NoJob). The compiled types changed (TypesVersion 6): start a new PowerShell window after updating. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
3.2 starts each program inside the Job Object (
TryStart). Three weak spots around that, none with a known trigger on a supported Windows, plus a way to see which path is in use:Assignonly cost that program its force-kill cleanup. In 3.2 a Win32 error while setting up the start (the pipes, the attribute list, the job attribute) became "could not start".Process.Startwas silent. If a future .NET moves the private start-lock field, or setup fails, the kit quietly goes back to 3.1's way, where a child a program starts straight away can escape the cleanup, while the README states the guarantee without qualification.What changed
Process.Startplus the Job Object, as 3.1 did. A failure ofCreateProcessitself (file not found and so on) still reports that the program couldn't start.Initialize-ParallelKitalso returnsVersionandStartMode(CreatedInJob,AddedToJoborNoJob). The README says what each means, that it's the session's default rather than a promise for every program, and asks for this output in bug reports. The header'sVersionline and the new constant name each other, and the harness checks they match.Before this, I checked whether creating a program with a job list can fail where 3.1's
Assignworked, with PowerShell already inside a restrictive Job Object (no limits, kill-on-close, breakaway allowed, silent breakaway, all UI restrictions, active-process limits including one reached exactly at the start). Both paths behaved the same on 5.1 and 7 every time, so only setup failures fall back.The compiled types changed (types version 6): after updating, start a new PowerShell window.
Testing
Versionmatches the header;StartModeisCreatedInJob, orAddedToJobwithout the start lock.🤖 Generated with Claude Code