From fce61829b9324bcfefac7712800bb574d205a9e7 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Tue, 18 Feb 2025 08:43:26 +0100 Subject: [PATCH] Terminal: Don't forcibly kill conpty process Sometimes (especially for the git bash.exe) closing a terminal seemed to not kill the shell process. This seemed to happen because we forcibly killed the conpty process which we rely on to actually kill the shell. Since we killed the conpty before it was able to close the shell, the shell would continue to run. This became evident during debugging, as the shell was killed if we stepped through the function, thereby delaying the killing of the conpty process. Fixes: QTCREATORBUG-32509 Change-Id: I468ec23d8a13c11cbd8d4b31c9a99736b0cdd07c Reviewed-by: Cristian Adam --- src/libs/3rdparty/libptyqt/conptyprocess.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libs/3rdparty/libptyqt/conptyprocess.cpp b/src/libs/3rdparty/libptyqt/conptyprocess.cpp index 31497d3333a..32035f32202 100644 --- a/src/libs/3rdparty/libptyqt/conptyprocess.cpp +++ b/src/libs/3rdparty/libptyqt/conptyprocess.cpp @@ -582,7 +582,6 @@ void _ClosePseudoConsoleMembers(_In_ PseudoConsole* pPty) // has yet to send before we hard kill it. if (_HandleIsValid(pPty->hConPtyProcess)) { - TerminateProcess(pPty->hConPtyProcess, 0); CloseHandle(pPty->hConPtyProcess); pPty->hConPtyProcess = nullptr; }