fix: server ctrl-c exit recovery color

This commit is contained in:
taynpg 2025-04-16 11:29:07 -04:00
parent 733c5a68a3
commit 8121a370ce
3 changed files with 6 additions and 5 deletions

3
.gitignore vendored
View File

@ -5,4 +5,5 @@ cmake-*
.xmake
compile_commands.json
out
xpbuild
xpbuild
cbuild

@ -1 +1 @@
Subproject commit 5ec78141817eef68f92a89b19ea5675f8b5b559b
Subproject commit 2cf72f3e5c5313527b5d1442017caf06d51a3c02

View File

@ -25,7 +25,7 @@ namespace fs = std::filesystem;
#include <crashelper.h>
#endif
void signal_handler(int signal)
void msignal_handler(int signal)
{
if (signal == SIGINT) {
fc_recovery_color();
@ -41,7 +41,7 @@ int main(int argc, char* argv[])
backward::SetDumpFileSavePath(err);
backward::SetDumpLogSavePath(err);
CRASHELPER_MARK_ENTRY();
sh.register_user_sig_handler([](int sig) { signal_handler(sig); });
sh.register_user_sig_handler([](int sig) { msignal_handler(sig); });
#endif
#ifdef _WIN32
@ -73,4 +73,4 @@ int main(int argc, char* argv[])
}
io_context.run();
return 0;
}
}