mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-17 20:25:27 +08:00
Fix: [ALAS] Emulator tree-killed when Alas gets killed
This commit is contained in:
@@ -54,7 +54,9 @@ class PlatformWindows(PlatformBase, EmulatorManager):
|
|||||||
"""
|
"""
|
||||||
command = command.replace(r"\\", "/").replace("\\", "/").replace('"', '"')
|
command = command.replace(r"\\", "/").replace("\\", "/").replace('"', '"')
|
||||||
logger.info(f'Execute: {command}')
|
logger.info(f'Execute: {command}')
|
||||||
return subprocess.Popen(command, close_fds=True) # only work on Windows
|
# `close_fds` only work on Windows
|
||||||
|
# `start_new_session` to avoid emulator getting tree-killed when Alas gets killed
|
||||||
|
return subprocess.Popen(command, close_fds=True, start_new_session=True)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def kill_process_by_regex(cls, regex: str) -> int:
|
def kill_process_by_regex(cls, regex: str) -> int:
|
||||||
|
|||||||
Reference in New Issue
Block a user