forked from qt-creator/qt-creator
Fix up QProcess::waitForFinished()
waitForFinish returns false if the process is no longer running at the time of the call. Handle that throughout the codebase. Change-Id: Ia7194095454e82efbd4eb88f2d55926bdd09e094 Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -211,7 +211,7 @@ void ConsoleProcess::stop()
|
||||
killStub();
|
||||
if (isRunning()) {
|
||||
d->m_process.terminate();
|
||||
if (!d->m_process.waitForFinished(1000)) {
|
||||
if (!d->m_process.waitForFinished(1000) && d->m_process.state() == QProcess::Running) {
|
||||
d->m_process.kill();
|
||||
d->m_process.waitForFinished();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user