Compare commits

...

1 Commits

Author SHA1 Message Date
Jiang Bohan
776a620706 docs(util): clarify EnsureHiddenConsole call-order contract
Co-authored-by: multica-agent <github@multica.ai>
2026-05-11 14:43:21 +08:00

View File

@@ -18,6 +18,11 @@ const swHide = 0
// visible to the user. Every child process (git, cmd, etc.) inherits this
// hidden console automatically, so no per-call SysProcAttr gymnastics are
// needed.
//
// MUST be called at daemon startup before any child process is spawned —
// the inherited hidden console only protects children started after this
// returns. A child spawned earlier will allocate its own visible console
// window and reintroduce the popup-flash regression from #2357.
func EnsureHiddenConsole() {
if hwnd, _, _ := procGetConsoleWnd.Call(); hwnd != 0 {
return // already have a console