fix(exit): taskkill rieng tung process — kill het plugin_host/fx_vst_bridge khi thoat app (truoc day /IM gop chi chay lenh dau); CREATE_NO_WINDOW cho moi subprocess engine (het terminal chớp chớp)
This commit is contained in:
@@ -419,6 +419,7 @@ def _pick_dir_native_engine() -> Optional[str]:
|
||||
r = subprocess.run(
|
||||
["powershell", "-NoProfile", "-STA", "-Command", ps],
|
||||
capture_output=True, text=True, timeout=PICK_DIR_TIMEOUT,
|
||||
creationflags=subprocess.CREATE_NO_WINDOW,
|
||||
)
|
||||
return r.stdout.strip() or None
|
||||
except Exception:
|
||||
@@ -798,7 +799,8 @@ async def open_in_carla(req: OpenInCarlaRequest, current_user: dict = Depends(ge
|
||||
cmd.append(carxs_path)
|
||||
try:
|
||||
cwd = os.path.dirname(carla) or None
|
||||
proc = subprocess.Popen(cmd, cwd=cwd, close_fds=os.name != "nt")
|
||||
proc = subprocess.Popen(cmd, cwd=cwd, close_fds=os.name != "nt",
|
||||
creationflags=subprocess.CREATE_NO_WINDOW if os.name == "nt" else 0)
|
||||
_register_carla_process(proc)
|
||||
return {
|
||||
"success": True,
|
||||
@@ -1778,7 +1780,8 @@ def _running_sonicforge_pids() -> list:
|
||||
out = subprocess.run(
|
||||
["powershell", "-NoProfile", "-Command",
|
||||
"Get-Process sonicforge-daw,daw_engine -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Id"],
|
||||
capture_output=True, text=True, timeout=10).stdout
|
||||
capture_output=True, text=True, timeout=10,
|
||||
creationflags=subprocess.CREATE_NO_WINDOW).stdout
|
||||
for line in out.splitlines():
|
||||
line = line.strip()
|
||||
if line.isdigit():
|
||||
|
||||
Reference in New Issue
Block a user