Git/VCS: Use ctrlc stub for process execution

This ensures that child processes are also terminated.

Required specifically for Git on Windows, when running in cmd directory,
which spawns a child process for usr/bin/git. On this case, if git takes
long to finish and is aborted while running, the main process was killed
as expected, but the child process remained alive.

Task-number: QTCREATORBUG-27567
Change-Id: I40271eb42cfaefd81f2fe5af138254ab0a2c8da8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Orgad Shaneh
2022-12-14 12:37:34 +02:00
committed by Orgad Shaneh
parent 3a90977da0
commit 371e674967
5 changed files with 5 additions and 0 deletions

View File

@@ -114,6 +114,7 @@ void VcsCommandPrivate::setupProcess(QtcProcess *process, const Job &job)
process->setProcessChannelMode(QProcess::MergedChannels);
if (m_codec)
process->setCodec(m_codec);
process->setUseCtrlCStub(true);
installStdCallbacks(process);