summaryrefslogtreecommitdiffstats
path: root/synchronizer/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'synchronizer/main.cpp')
-rw-r--r--synchronizer/main.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/synchronizer/main.cpp b/synchronizer/main.cpp
index 86e1497..587f96a 100644
--- a/synchronizer/main.cpp
+++ b/synchronizer/main.cpp
@@ -19,15 +19,25 @@
19 19
20#include <QApplication> 20#include <QApplication>
21 21
22#include "common/console.h" 22#include <signal.h>
23
23#include "listener.h" 24#include "listener.h"
25#include "log.h"
26
27void crashHandler(int sig) {
28 std::fprintf(stderr, "Error: signal %d\n", sig);
29 std::system("exec xterm -e gdb -p \"$PPID\"");
30 std::abort();
31}
24 32
25int main(int argc, char *argv[]) 33int main(int argc, char *argv[])
26{ 34{
35 //For crashes
36 signal(SIGSEGV, crashHandler);
27 QApplication app(argc, argv); 37 QApplication app(argc, argv);
28 38
29 if (argc < 2) { 39 if (argc < 2) {
30 qWarning() << "Not enough args passed, no resource loaded."; 40 Warning() << "Not enough args passed, no resource loaded.";
31 return app.exec(); 41 return app.exec();
32 } 42 }
33 43