From 232e62c4050ad7923955054b09a62d8be720fd21 Mon Sep 17 00:00:00 2001 From: QwQ <59914293+Qv2ray-dev@users.noreply.github.com> Date: Fri, 7 Aug 2020 11:16:57 +0800 Subject: [PATCH] fix: do not send kill signal to pid0 --- makespec/BUILDVERSION | 2 +- src/main.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/makespec/BUILDVERSION b/makespec/BUILDVERSION index 69b0804d..a328b99f 100644 --- a/makespec/BUILDVERSION +++ b/makespec/BUILDVERSION @@ -1 +1 @@ -5866 +5867 diff --git a/src/main.cpp b/src/main.cpp index 0f484166..2fd5fb4a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -11,6 +11,8 @@ #include // #include +#else + #include #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