File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,15 @@ import (
1010
1111// detachAttrs returns SysProcAttr configured to place the child in its own
1212// process group so that console signals (Ctrl+C) delivered to the parent's
13- // group are not forwarded to the child.
13+ // group are not forwarded to the child, and to suppress any console window
14+ // for the child and its descendants.
15+ //
16+ // CREATE_NO_WINDOW is preferred over DETACHED_PROCESS here: DETACHED_PROCESS
17+ // removes the console entirely, which causes any console-subsystem descendant
18+ // (e.g. tzutil.exe invoked transitively to resolve the local IANA timezone)
19+ // to allocate a fresh conhost window, producing a visible flash on every gh
20+ // invocation. CREATE_NO_WINDOW gives the child a non-visible console that
21+ // descendants can inherit, avoiding the flash.
1422func detachAttrs () * syscall.SysProcAttr {
15- return & syscall.SysProcAttr {CreationFlags : windows .CREATE_NEW_PROCESS_GROUP | windows .DETACHED_PROCESS }
23+ return & syscall.SysProcAttr {CreationFlags : windows .CREATE_NEW_PROCESS_GROUP | windows .CREATE_NO_WINDOW }
1624}
You can’t perform that action at this time.
0 commit comments