fix: do not send kill signal to pid0

This commit is contained in:
QwQ 2020-08-07 11:16:57 +08:00
parent 78868388aa
commit 232e62c405
2 changed files with 4 additions and 2 deletions

View File

@ -1 +1 @@
5866
5867

View File

@ -11,6 +11,8 @@
#include <Windows.h>
//
#include <DbgHelp.h>
#else
#include <unistd.h>
#endif
const QString SayLastWords() noexcept
@ -125,7 +127,7 @@ void signalHandler(int signum)
QvMessageBoxWarn(nullptr, "UNCAUGHT EXCEPTION", message);
}
#ifndef Q_OS_WIN
kill(0, SIGTRAP);
kill(getpid(), SIGTRAP);
#else
exit(-99);
#endif