forked from qt-creator/qt-creator
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 <cristian.adam@qt.io>
This commit is contained in:
1
src/libs/3rdparty/libptyqt/conptyprocess.cpp
vendored
1
src/libs/3rdparty/libptyqt/conptyprocess.cpp
vendored
@@ -582,7 +582,6 @@ void _ClosePseudoConsoleMembers(_In_ PseudoConsole* pPty)
|
|||||||
// has yet to send before we hard kill it.
|
// has yet to send before we hard kill it.
|
||||||
if (_HandleIsValid(pPty->hConPtyProcess))
|
if (_HandleIsValid(pPty->hConPtyProcess))
|
||||||
{
|
{
|
||||||
TerminateProcess(pPty->hConPtyProcess, 0);
|
|
||||||
CloseHandle(pPty->hConPtyProcess);
|
CloseHandle(pPty->hConPtyProcess);
|
||||||
pPty->hConPtyProcess = nullptr;
|
pPty->hConPtyProcess = nullptr;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user