Commit 5985101
fix(windows): CREATE_BREAKAWAY_FROM_JOB to survive PowerShell pipelines
PowerShell uses Windows Job Objects to manage pipeline processes. When the
launcher exits, the Job Object kills all child processes — including the
daemon that was just spawned — forcing a full cold restart on every command.
Add CREATE_BREAKAWAY_FROM_JOB (0x01000000) to the daemon's CreationFlags so
it is detached from the parent Job Object and survives launcher exit.
Without this fix: daemon killed after every invocation from PowerShell,
hot-path took 4-15s due to repeated cold restarts.
With this fix: daemon persists across launcher exits, hot-path ~600ms.
Git Bash was unaffected because it does not use Job Objects for child
process tracking.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>1 parent 3934c4e commit 5985101
1 file changed
Lines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
14 | 22 | | |
15 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
16 | 27 | | |
0 commit comments