Commit e4bbfc82 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(src/externals/single-application/SingleApplication): log abnormally exit

parent b1b19d6d
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
// THE SOFTWARE. // THE SOFTWARE.
#include <cstdlib> #include <cstdlib>
#include <iostream>
#include <QtCore/QDir> #include <QtCore/QDir>
#include <QtCore/QProcess> #include <QtCore/QProcess>
...@@ -52,6 +53,8 @@ static const char SecondaryInstance = 'S'; ...@@ -52,6 +53,8 @@ static const char SecondaryInstance = 'S';
static const char Reconnect = 'R'; static const char Reconnect = 'R';
static const char InvalidConnection = '\0'; static const char InvalidConnection = '\0';
using namespace std;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
SingleApplicationPrivate::SingleApplicationPrivate (SingleApplication *q_ptr) : q_ptr(q_ptr) { SingleApplicationPrivate::SingleApplicationPrivate (SingleApplication *q_ptr) : q_ptr(q_ptr) {
...@@ -250,6 +253,8 @@ void SingleApplicationPrivate::connectToPrimary (int msecs, char connectionType) ...@@ -250,6 +253,8 @@ void SingleApplicationPrivate::connectToPrimary (int msecs, char connectionType)
delete sharedMem.back(); delete sharedMem.back();
sharedMem.pop_back(); sharedMem.pop_back();
} }
cout << "[PROCESS ABNORMALLY TERMINATED]: " << signum << endl;
::exit(128 + signum); ::exit(128 + signum);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment