forked from qt-creator/qt-creator
SshProcessInterface: Limit waiting for kill to finish
This is just a workaround for 9.0 and not a proper fix! It looks like sometimes kill command may freeze. Don't blocking wait for it for 30 seconds - limit this time to 2 seconds. Do the same inside SimpleTargetRunner. Pretend the process finished after 2 seconds, otherwise the SimpleTargetRunner object gets leaked and we start receiving asserts from ProcessLauncher about destructing it when still some processes are being run. Task-number: QTCREATORBUG-28072 Change-Id: I9766e7ff6f0c2abf2010686027702d30d32c4318 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -1320,7 +1320,11 @@ void SimpleTargetRunnerPrivate::stop()
|
||||
switch (m_state) {
|
||||
case Run:
|
||||
m_process.stop();
|
||||
m_process.waitForFinished();
|
||||
if (!m_process.waitForFinished(2000)) { // TODO: it may freeze on some devices
|
||||
QTC_CHECK(false); // Shouldn't happen, just emergency handling
|
||||
m_process.close();
|
||||
forwardDone();
|
||||
}
|
||||
break;
|
||||
case Inactive:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user