Windows: Prevent Windows 11 from starting a conhost.exe process for ever calibre worker process

Apparently on modern windows we need DETACHED_PROCESS not
CREATE_NO_WINDOW. Sigh.

See #2111559 (Fetching news, wrong path for conhost.exe)
This commit is contained in:
Kovid Goyal 2025-05-24 13:18:59 +05:30
parent cd93465871
commit bd16e3120b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -80,7 +80,7 @@ def windows_creationflags_for_worker_process(priority: str = 'normal') -> int:
'high' : subprocess.HIGH_PRIORITY_CLASS, 'high' : subprocess.HIGH_PRIORITY_CLASS,
'normal': subprocess.NORMAL_PRIORITY_CLASS, 'normal': subprocess.NORMAL_PRIORITY_CLASS,
'low' : subprocess.IDLE_PRIORITY_CLASS 'low' : subprocess.IDLE_PRIORITY_CLASS
}[priority] | subprocess.CREATE_NO_WINDOW }[priority] | subprocess.DETACHED_PROCESS
class Worker: class Worker: