mirror of
https://github.com/Qv2ray/Qv2ray.git
synced 2025-05-20 10:50:23 +08:00
fix: trigger crash on signal handler
This commit is contained in:
parent
11f454bc76
commit
160d58c4b2
@ -1 +1 @@
|
|||||||
5860
|
5861
|
||||||
|
@ -113,7 +113,7 @@ void signalHandler(int signum)
|
|||||||
{
|
{
|
||||||
std::cout << msg.toStdString() << std::endl;
|
std::cout << msg.toStdString() << std::endl;
|
||||||
QDir().mkpath(QV2RAY_CONFIG_DIR + "bugreport/");
|
QDir().mkpath(QV2RAY_CONFIG_DIR + "bugreport/");
|
||||||
StringToFile(msg, filePath);
|
StringToFile("Signal: " + QSTRN(signum) + NEWLINE + msg, filePath);
|
||||||
std::cout << "Backtrace saved in: " + filePath.toStdString() << std::endl;
|
std::cout << "Backtrace saved in: " + filePath.toStdString() << std::endl;
|
||||||
}
|
}
|
||||||
if (qvApp)
|
if (qvApp)
|
||||||
@ -124,7 +124,7 @@ void signalHandler(int signum)
|
|||||||
filePath;
|
filePath;
|
||||||
QvMessageBoxWarn(nullptr, "UNCAUGHT EXCEPTION", message);
|
QvMessageBoxWarn(nullptr, "UNCAUGHT EXCEPTION", message);
|
||||||
}
|
}
|
||||||
exit(-99);
|
kill(0, SIGTRAP);
|
||||||
}
|
}
|
||||||
|
|
||||||
QPair<Qv2rayExitCode, std::optional<QString>> RunQv2rayApplicationScoped(int argc, char *argv[])
|
QPair<Qv2rayExitCode, std::optional<QString>> RunQv2rayApplicationScoped(int argc, char *argv[])
|
||||||
|
Loading…
Reference in New Issue
Block a user