summaryrefslogtreecommitdiffstats
path: root/tests/arthur
diff options
context:
space:
mode:
authoraavit <qt-info@nokia.com>2010-11-25 11:14:51 (GMT)
committeraavit <qt-info@nokia.com>2010-11-25 11:18:46 (GMT)
commit73fb20bc600546e5c7d7e0ad41b28a9b7856665a (patch)
tree937d38889496f139742ec6dabbee60779353f4c4 /tests/arthur
parentb3df558742f6eab6971f2c483bba19c308b7d1ff (diff)
downloadQt-73fb20bc600546e5c7d7e0ad41b28a9b7856665a.zip
Qt-73fb20bc600546e5c7d7e0ad41b28a9b7856665a.tar.gz
Qt-73fb20bc600546e5c7d7e0ad41b28a9b7856665a.tar.bz2
Avoid race condition: don't quit until new executable is ready
Diffstat (limited to 'tests/arthur')
-rw-r--r--tests/arthur/baselineserver/src/baselineserver.cpp2
-rw-r--r--tests/arthur/common/baselineprotocol.pri1
2 files changed, 3 insertions, 0 deletions
diff --git a/tests/arthur/baselineserver/src/baselineserver.cpp b/tests/arthur/baselineserver/src/baselineserver.cpp
index 0399224..fbf68f5 100644
--- a/tests/arthur/baselineserver/src/baselineserver.cpp
+++ b/tests/arthur/baselineserver/src/baselineserver.cpp
@@ -97,6 +97,8 @@ void BaselineServer::heartbeat()
QFileInfo me(QCoreApplication::applicationFilePath());
if (me.lastModified() == meLastMod)
return;
+ if (!me.exists() || !me.isExecutable())
+ return;
//# (could close() here to avoid accepting new connections, to avoid livelock)
//# also, could check for a timeout to force exit, to avoid hung threads blocking
diff --git a/tests/arthur/common/baselineprotocol.pri b/tests/arthur/common/baselineprotocol.pri
index 996f9d5..62e38a6 100644
--- a/tests/arthur/common/baselineprotocol.pri
+++ b/tests/arthur/common/baselineprotocol.pri
@@ -1,4 +1,5 @@
INCLUDEPATH += $$PWD
+DEPENDPATH += $$PWD
QT *= network