procutil: import concerns about creationflags on Windows from D1701
authorBoris Feld <boris.feld@octobus.net>
Tue, 06 Nov 2018 11:54:15 +0100
changeset 40586 1d3bed7d2923
parent 40585 473510bf0575
child 40587 cbd251d479bb
procutil: import concerns about creationflags on Windows from D1701 I don't have the need anymore for the change in D1701 nor the time to investigate the changes on all supported Windows platforms. I import the stuff I learned on D1701 in the `runbgcommand` so the next people working on it can starts from there. Differential Revision: https://phab.mercurial-scm.org/D5229
mercurial/utils/procutil.py
--- a/mercurial/utils/procutil.py	Mon Nov 05 14:14:32 2018 -0800
+++ b/mercurial/utils/procutil.py	Tue Nov 06 11:54:15 2018 +0100
@@ -474,6 +474,9 @@
     # https://msdn.microsoft.com/en-us/library/windows/desktop/ms684863.aspx
     # No stdlib constant exists for this value
     DETACHED_PROCESS = 0x00000008
+    # Following creation flags might create a console GUI window.
+    # Using subprocess.CREATE_NEW_CONSOLE might helps.
+    # See https://phab.mercurial-scm.org/D1701 for discussion
     _creationflags = DETACHED_PROCESS | subprocess.CREATE_NEW_PROCESS_GROUP
 
     def runbgcommand(script, env, shell=False, stdout=None, stderr=None):