From 4b33e1b6914104ee9a0d5f4b628fe8821384e067 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Fri, 24 May 2024 11:07:52 +0800 Subject: [PATCH] Terminal (Windows): don't try to detect terminals in MSYS shell May fix CI hanging --- src/detection/terminalshell/terminalshell_windows.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/detection/terminalshell/terminalshell_windows.c b/src/detection/terminalshell/terminalshell_windows.c index 7edfd0ef1..4ba1b92d8 100644 --- a/src/detection/terminalshell/terminalshell_windows.c +++ b/src/detection/terminalshell/terminalshell_windows.c @@ -289,6 +289,13 @@ conhost: static uint32_t getTerminalInfo(FFTerminalResult* result, uint32_t pid) { + if (getenv("MSYSTEM")) + { + // Don't try to detect terminals in MSYS shell + // It won't work because MSYS doesn't follow process tree of native Windows programs + return 0; + } + uint32_t ppid = 0; bool hasGui;