From a2ffe70b4e1fa54d7013f327b45970e18e08901a Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Thu, 9 May 2019 18:06:21 -1000 Subject: [PATCH] Don't kill windows console on abort --- lib/logvisor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/logvisor.cpp b/lib/logvisor.cpp index c01744d..46c1e4d 100644 --- a/lib/logvisor.cpp +++ b/lib/logvisor.cpp @@ -99,8 +99,8 @@ void KillProcessTree() { // kill child processes while (bContinue) { - // only kill child processes - if (pe.th32ParentProcessID == myprocID) { + // only kill child processes and let console window remain + if (pe.th32ParentProcessID == myprocID && wcscmp(pe.szExeFile, L"conhost.exe")) { HANDLE hChildProc = ::OpenProcess(PROCESS_ALL_ACCESS, FALSE, pe.th32ProcessID); if (hChildProc) {