fix: server ctrl-c exit recovery color
This commit is contained in:
parent
733c5a68a3
commit
8121a370ce
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@ cmake-*
|
|||||||
compile_commands.json
|
compile_commands.json
|
||||||
out
|
out
|
||||||
xpbuild
|
xpbuild
|
||||||
|
cbuild
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 5ec78141817eef68f92a89b19ea5675f8b5b559b
|
Subproject commit 2cf72f3e5c5313527b5d1442017caf06d51a3c02
|
@ -25,7 +25,7 @@ namespace fs = std::filesystem;
|
|||||||
#include <crashelper.h>
|
#include <crashelper.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void signal_handler(int signal)
|
void msignal_handler(int signal)
|
||||||
{
|
{
|
||||||
if (signal == SIGINT) {
|
if (signal == SIGINT) {
|
||||||
fc_recovery_color();
|
fc_recovery_color();
|
||||||
@ -41,7 +41,7 @@ int main(int argc, char* argv[])
|
|||||||
backward::SetDumpFileSavePath(err);
|
backward::SetDumpFileSavePath(err);
|
||||||
backward::SetDumpLogSavePath(err);
|
backward::SetDumpLogSavePath(err);
|
||||||
CRASHELPER_MARK_ENTRY();
|
CRASHELPER_MARK_ENTRY();
|
||||||
sh.register_user_sig_handler([](int sig) { signal_handler(sig); });
|
sh.register_user_sig_handler([](int sig) { msignal_handler(sig); });
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
Loading…
x
Reference in New Issue
Block a user