-
Notifications
You must be signed in to change notification settings - Fork 75
v0.2.54..v0.2.55 changeset ProcessPool.cpp
Garret Voltz edited this page Aug 14, 2020
·
1 revision
diff --git a/hoot-test/src/main/cpp/hoot/test/ProcessPool.cpp b/hoot-test/src/main/cpp/hoot/test/ProcessPool.cpp
index 4659903..045abd6 100644
--- a/hoot-test/src/main/cpp/hoot/test/ProcessPool.cpp
+++ b/hoot-test/src/main/cpp/hoot/test/ProcessPool.cpp
@@ -22,7 +22,7 @@
* This will properly maintain the copyright information. DigitalGlobe
* copyrights will be updated automatically.
*
- * @copyright Copyright (C) 2017, 2018, 2019 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2017, 2018, 2019, 2020 DigitalGlobe (http://www.digitalglobe.com/)
*/
#include "ProcessPool.h"
@@ -192,8 +192,11 @@ void ProcessThread::processJobs(JobQueue* queue)
if (_proc->bytesAvailable() < 1)
_proc->waitForReadyRead(READ_TIMEOUT);
next = QString(_proc->readLine()).trimmed();
- if (next != HOOT_TEST_FINISHED)
+ if (next != HOOT_TEST_FINISHED && !next.isEmpty())
line.append(next.append("\n"));
+ // If the process ends here before writing HOOT_TEST_FINISH, break out of the loop
+ if (_proc->state() != QProcess::Running)
+ break;
}
}
output.append(line);