ensure_server: start with a hidden console (CREATE_NO_WINDOW), never DETACHED_PROCESS: a console-less server made every git and compiler run it started open a visible window

This commit is contained in:
KeelrLeek committed 2026-10-07 08:48:58 -05:00
1 parent 3d9ac4ca9a
commit e0b9a82e7a
1 file changed
+2 -2
+2 -2
View File
@@ -221,8 +221,8 @@ def ensure_server(project, every=60):
import subprocess import subprocess
flags = 0 flags = 0
if os.name == "nt": if os.name == "nt":
flags = (subprocess.DETACHED_PROCESS | subprocess.CREATE_NEW_PROCESS_GROUP flags = (subprocess.CREATE_NO_WINDOW | subprocess.CREATE_NEW_PROCESS_GROUP # hidden console, no windows
| subprocess.CREATE_BREAKAWAY_FROM_JOB | subprocess.CREATE_NO_WINDOW) | subprocess.CREATE_BREAKAWAY_FROM_JOB)
command = start if isinstance(start, list) else [start] command = start if isinstance(start, list) else [start]
try: try:
subprocess.Popen(command, creationflags=flags, stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL, subprocess.Popen(command, creationflags=flags, stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL,