fix(windows): hide the console windows of spawned child processes - #1448
Open
mlandolfi90 wants to merge 1 commit into
Open
fix(windows): hide the console windows of spawned child processes#1448mlandolfi90 wants to merge 1 commit into
mlandolfi90 wants to merge 1 commit into
Conversation
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.
Two
CreateProcessWcall sites insrc/foundation/spawn children withoutCREATE_NO_WINDOW, so on Windows each one flashes a console window:cbm_subprocess_spawn_win(src/foundation/subprocess.c) — the supervisor → index-worker spawn.cbm_popen_isolated(src/foundation/compat_fs.c).src/daemon/bootstrap.calready passes the flag for the daemon self-spawn, so this brings the remaining two in line with it.User-visible effect: when the MCP server is driven by an editor/agent over stdio, indexing a repository pops console windows onto the desktop — one per worker spawn. Nothing breaks, but on a machine that reindexes on file changes it is a steady stream of windows stealing focus.
CREATE_NO_WINDOWonly suppresses console allocation; it does not detach the process, change the process group, or affect the inherited handle list, so the existingEXTENDED_STARTUPINFO_PRESENT | CREATE_SUSPENDED | CREATE_NEW_PROCESS_GROUPsemantics and the worker-log handle plumbing are untouched.🤖 Generated with Claude Code