We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c5e4fe3 commit 806a048Copy full SHA for 806a048
src/main.cpp
@@ -240,7 +240,12 @@ int main(int argc, const char* argv[]) noexcept {
240
sigIntHandler.sa_handler = sigint_handler;
241
sigemptyset(&sigIntHandler.sa_mask);
242
sigIntHandler.sa_flags = 0;
243
- sigaction(SIGINT | SIGTERM, &sigIntHandler, nullptr);
+ if (sigaction(SIGINT, &sigIntHandler, nullptr) != 0) {
244
+ zit::logger()->warn("Error: Failed to set SIGINT handler.");
245
+ }
246
+ if (sigaction(SIGTERM, &sigIntHandler, nullptr) != 0) {
247
+ zit::logger()->warn("Error: Failed to set SIGTERM handler.");
248
249
// NOLINTEND(cppcoreguidelines-pro-type-union-access,misc-include-cleaner)
250
#endif // !WIN32
251
0 commit comments