mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
sys: Improved signal handling
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user