mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 12:13:40 +02:00
Merge pull request #4748 from sethalves/shutdown-harder
try harder to make sure all the assignment-client children stop
This commit is contained in:
commit
c273ea7d46
1 changed files with 21 additions and 1 deletions
|
@ -22,6 +22,7 @@
|
|||
|
||||
|
||||
const QString ASSIGNMENT_CLIENT_MONITOR_TARGET_NAME = "assignment-client-monitor";
|
||||
const int WAIT_FOR_CHILD_MSECS = 500;
|
||||
|
||||
AssignmentClientMonitor::AssignmentClientMonitor(const unsigned int numAssignmentClientForks,
|
||||
const unsigned int minAssignmentClientForks,
|
||||
|
@ -91,7 +92,26 @@ void AssignmentClientMonitor::stopChildProcesses() {
|
|||
});
|
||||
|
||||
// try to give all the children time to shutdown
|
||||
waitOnChildren(15000);
|
||||
waitOnChildren(WAIT_FOR_CHILD_MSECS);
|
||||
|
||||
// ask more firmly
|
||||
QMutableListIterator<QProcess*> i(_childProcesses);
|
||||
while (i.hasNext()) {
|
||||
QProcess* childProcess = i.next();
|
||||
childProcess->terminate();
|
||||
}
|
||||
|
||||
// try to give all the children time to shutdown
|
||||
waitOnChildren(WAIT_FOR_CHILD_MSECS);
|
||||
|
||||
// ask even more firmly
|
||||
QMutableListIterator<QProcess*> j(_childProcesses);
|
||||
while (j.hasNext()) {
|
||||
QProcess* childProcess = j.next();
|
||||
childProcess->kill();
|
||||
}
|
||||
|
||||
waitOnChildren(WAIT_FOR_CHILD_MSECS);
|
||||
}
|
||||
|
||||
void AssignmentClientMonitor::aboutToQuit() {
|
||||
|
|
Loading…
Reference in a new issue