Skip to content

Commit

Permalink
feat(main): refine shutdown message to show signal name (#2733)
Browse files Browse the repository at this point in the history
  • Loading branch information
PragmaTwice authored Jan 25, 2025
1 parent c1009a9 commit 9ab1a04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cli/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@

Server *srv = nullptr;

extern "C" void SignalHandler([[maybe_unused]] int sig) {
extern "C" void SignalHandler(int sig) {
if (srv && !srv->IsStopped()) {
LOG(INFO) << "Signal " << sig << " received, stopping the server";
LOG(INFO) << "Signal " << strsignal(sig) << " (" << sig << ") received, stopping the server";
srv->Stop();
}
}
Expand Down

0 comments on commit 9ab1a04

Please sign in to comment.