fix(hooks): replace DETACHED_PROCESS with CREATE_NO_WINDOW on Windows - #2254
Closed
hopstreax wants to merge 2 commits into
Closed
fix(hooks): replace DETACHED_PROCESS with CREATE_NO_WINDOW on Windows#2254hopstreax wants to merge 2 commits into
hopstreax wants to merge 2 commits into
Conversation
Collaborator
|
Thanks @hopstreax. Shipped in v0.9.29 (cherry-picked to v8 to preserve authorship). Closed-unmerged here, but it's in the release: https://github.com/Graphify-Labs/graphify/releases/tag/v0.9.29 |
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.
Summary
Fixes #2253.
On Windows, Graphify's Git hook launcher started the background rebuild using
DETACHED_PROCESStogether withpython.exe. Sincepython.exeis a console-subsystem executable, this caused Windows to open a new console window during every background rebuild triggered bypost-commitandpost-checkouthooks.This change replaces
DETACHED_PROCESSwithCREATE_NO_WINDOWwhile preserving the existing detached background execution behavior by keeping:CREATE_NEW_PROCESS_GROUPCREATE_BREAKAWAY_FROM_JOB(best-effort)The POSIX launch path (
start_new_session=True) is unchanged.Changes
DETACHED_PROCESScreation flag withCREATE_NO_WINDOWin the hook launcher.CREATE_NO_WINDOW.Why this approach?
The hook launcher introduced in #1161 was designed to replace the previous
nohup-based implementation with a cross-platform Python launcher. This change preserves those original design goals:CREATE_NO_WINDOWsuppresses the unwanted console window while retaining the existing process-group behavior throughCREATE_NEW_PROCESS_GROUPand the existing best-effortCREATE_BREAKAWAY_FROM_JOB.Validation
Tested on Windows by:
graphify hook installgraph.json,graph.html, andGRAPH_REPORT.mdare regeneratedAlso updated and ran the relevant hook regression test to validate the generated launcher uses the expected Windows creation flags.