mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
extutil: make background run truly background
Summary: `DETACHED_PROCESS` simply means that child process won't inherit current process' console (it does get one allocated by the OS though). `CREATE_NO_WINDOW` means that child process does not get an allocated console altogether. For details: https://msdn.microsoft.com/en-us/library/windows/desktop/ms684863(v=vs.85).aspx Reviewed By: quark-zju Differential Revision: D7969621 fbshipit-source-id: 58d5e69808fb1064bcc1101c971f52088a7fd2de
This commit is contained in:
parent
a2e7d1cfe3
commit
b955fc974e
@ -22,11 +22,8 @@ from mercurial import (
|
||||
)
|
||||
|
||||
if pycompat.iswindows:
|
||||
# no fork on Windows, but we can create a detached process
|
||||
# https://msdn.microsoft.com/en-us/library/windows/desktop/ms684863.aspx
|
||||
# No stdlib constant exists for this value
|
||||
DETACHED_PROCESS = 0x00000008
|
||||
_creationflags = DETACHED_PROCESS | subprocess.CREATE_NEW_PROCESS_GROUP
|
||||
CREATE_NO_WINDOW = 0x08000000
|
||||
_creationflags = CREATE_NO_WINDOW | subprocess.CREATE_NEW_PROCESS_GROUP
|
||||
|
||||
def runbgcommand(script, env, shell=False, stdout=None, stderr=None):
|
||||
'''Spawn a command without waiting for it to finish.'''
|
||||
|
Loading…
Reference in New Issue
Block a user