Repository navigation
fix(service): start the detached service without a console window on Windows - #267
Merged
Zongwei9888 merged 1 commit intoOct 21, 2026
Merged
Conversation
…Windows DETACHED_PROCESS makes Windows allocate a brand-new console for the child. With Windows Terminal (ConPTY) as the default terminal handler that console surfaces as a real, visible WindowsTerminal window on every `service start`, which floods the desktop when the CLI is driven from a harness that starts and stops the service repeatedly. CREATE_NO_WINDOW keeps the process windowless -- the console is private to the child and never inherited -- while still outliving the launcher, so the detached contract is unchanged. CREATE_NO_WINDOW is ignored when it is combined with DETACHED_PROCESS, hence the replacement rather than an addition; CREATE_NEW_PROCESS_GROUP is kept. The replica in tests/app_server/test_service.py mirrors the flag, so the detached parametrization stops spawning a console window as well.
Collaborator
|
Merged into main on 2026-10-21 as 249efc2 ("Merge PR #267: start the Windows service without a console window"). Thank you, the flag change is right and Windows CI passed with it. One follow-up on main in e40ac1d rewords the comment in It's in the README news for 2026-10-21. |
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_PROCESSmakes Windows allocate a brand-new console for the service, which default terminal hosts surface as a visible window on everyservice start.CREATE_NO_WINDOWstill runs without any window and still outlives the launcher (the console is private to the child, never inherited).CREATE_NEW_PROCESS_GROUPis kept.The detached-parametrization replica in
tests/app_server/test_service.pymirrors the flag change.Verification
tests/app_server/test_service.pyon Windows 11: 30 passed.Checks
mainstill usesDETACHED_PROCESSatcli/service_cli.py:174.