summaryrefslogtreecommitdiffstats
path: root/application/main.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-11-18 16:04:08 +0100
committerPetr Mrázek <peterix@gmail.com>2016-11-19 22:11:45 +0100
commit69be23c5f629884465dec98efcb9d5a2678b4df5 (patch)
tree9c9135bb995006fac7a6de3b349fe24b325dbe99 /application/main.cpp
parente974950d48e4e8b9500acbeadf9c1abdab1dec72 (diff)
downloadMultiMC-69be23c5f629884465dec98efcb9d5a2678b4df5.tar
MultiMC-69be23c5f629884465dec98efcb9d5a2678b4df5.tar.gz
MultiMC-69be23c5f629884465dec98efcb9d5a2678b4df5.tar.lz
MultiMC-69be23c5f629884465dec98efcb9d5a2678b4df5.tar.xz
MultiMC-69be23c5f629884465dec98efcb9d5a2678b4df5.zip
GH-1726 better failure detection for updates
Instead of just checking if the new version started, make sure it is able to write its IPC key to a file and then use the key to connect to the process.
Diffstat (limited to 'application/main.cpp')
-rw-r--r--application/main.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/application/main.cpp b/application/main.cpp
index 61771f6e..0fd9f089 100644
--- a/application/main.cpp
+++ b/application/main.cpp
@@ -4,8 +4,30 @@
#include <InstanceList.h>
#include <QDebug>
+// #define BREAK_INFINITE_LOOP
+// #define BREAK_EXCEPTION
+// #define BREAK_RETURN
+
+#ifdef BREAK_INFINITE_LOOP
+#include <thread>
+#include <chrono>
+#endif
+
int main(int argc, char *argv[])
{
+#ifdef BREAK_INFINITE_LOOP
+ while(true)
+ {
+ std::this_thread::sleep_for(std::chrono::milliseconds(250));
+ }
+#endif
+#ifdef BREAK_EXCEPTION
+ throw 42;
+#endif
+#ifdef BREAK_RETURN
+ return 42;
+#endif
+
// initialize Qt
MultiMC app(argc, argv);