From 4eac60b463a9645f606015263599e79aa2593814 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Fri, 1 May 2015 16:34:44 -0700 Subject: [PATCH] try harder to make sure all the assignment-client children stop --- .../src/AssignmentClientMonitor.cpp | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/assignment-client/src/AssignmentClientMonitor.cpp b/assignment-client/src/AssignmentClientMonitor.cpp index df77e33ef0..7392a47160 100644 --- a/assignment-client/src/AssignmentClientMonitor.cpp +++ b/assignment-client/src/AssignmentClientMonitor.cpp @@ -91,7 +91,26 @@ void AssignmentClientMonitor::stopChildProcesses() { }); // try to give all the children time to shutdown - waitOnChildren(15000); + waitOnChildren(200); + + // ask more firmly + QMutableListIterator i(_childProcesses); + while (i.hasNext()) { + QProcess* childProcess = i.next(); + childProcess->kill(); + } + + // try to give all the children time to shutdown + waitOnChildren(200); + + // ask even more firmly + QMutableListIterator j(_childProcesses); + while (j.hasNext()) { + QProcess* childProcess = j.next(); + childProcess->terminate(); + } + + waitOnChildren(200); } void AssignmentClientMonitor::aboutToQuit() {