1
0
mirror of synced 2025-02-17 18:59:21 +01:00

sys: Improved signal handling

This commit is contained in:
WerWolv 2022-08-09 15:00:16 +02:00
parent a3132b7d13
commit d4af07ed51

View File

@ -64,7 +64,12 @@ namespace hex {
}
static void signalHandler(int signalNumber) {
// Ignore SIGTERMs and SIGINTs so ImHex can be killed with Ctrl+C and a debugger
if (signalNumber == SIGTERM || signalNumber == SIGINT)
return;
log::fatal("Terminating with signal {}", signalNumber);
EventManager::post<EventAbnormalTermination>(signalNumber);
if (std::uncaught_exceptions() > 0) {