Start Crash Handler detached

This commit is contained in:
Florian Märkl 2019-04-10 13:26:30 +02:00
parent c2deabee5d
commit 5add53cbf8

View File

@ -42,9 +42,10 @@ bool callback(const wchar_t *_dump_dir,
{ {
const QDir dir = QString::fromWCharArray(_dump_dir); const QDir dir = QString::fromWCharArray(_dump_dir);
const QString id = QString::fromWCharArray(_minidump_id); const QString id = QString::fromWCharArray(_minidump_id);
QProcess::execute(QCoreApplication::applicationFilePath() QProcess::startDetached(QCoreApplication::applicationFilePath()
+ " --start-crash-handler " + " --start-crash-handler "
+ dir.filePath(id + ".dmp")); + dir.filePath(id + ".dmp"));
_exit(1);
return true; return true;
} }
#elif defined (Q_OS_LINUX) #elif defined (Q_OS_LINUX)
@ -52,9 +53,10 @@ bool callback(const wchar_t *_dump_dir,
// Saves path to file // Saves path to file
bool callback(const google_breakpad::MinidumpDescriptor &md, void *context, bool b) bool callback(const google_breakpad::MinidumpDescriptor &md, void *context, bool b)
{ {
QProcess::execute(QCoreApplication::applicationFilePath() QProcess::startDetached(QCoreApplication::applicationFilePath()
+ " --start-crash-handler " + " --start-crash-handler "
+ md.path()); + md.path());
_exit(1);
return true; return true;
} }
#elif defined (Q_OS_MACOS) #elif defined (Q_OS_MACOS)
@ -64,9 +66,10 @@ bool callback(const char *dump_dir, const char *minidump_id, void *context, bool
{ {
const QDir dir = QString::fromUtf8(dump_dir); const QDir dir = QString::fromUtf8(dump_dir);
const QString id = QString::fromUtf8(minidump_id); const QString id = QString::fromUtf8(minidump_id);
QProcess::execute(QCoreApplication::applicationFilePath() QProcess::startDetached(QCoreApplication::applicationFilePath()
+ " --start-crash-handler " + " --start-crash-handler "
+ dir.filePath(id + ".dmp")); + dir.filePath(id + ".dmp"));
_exit(1);
return true; return true;
} }
#endif // Q_OS #endif // Q_OS