1
0
mirror of synced 2024-11-15 03:27:40 +01:00

Fix infinite loop on signal handling. (#338)

* Fix infinite loop on signal handling.

Signed-off-by: KokaKiwi <kokakiwi+git@kokakiwi.net>

* Re-raise same signal in sighandler
This commit is contained in:
KokaKiwi 2021-11-09 19:14:25 +01:00 committed by GitHub
parent 434de44ef5
commit 15f81cc316
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -241,7 +241,9 @@ namespace hex {
auto signalHandler = [](int signalNumber) {
EventManager::post<EventAbnormalTermination>(signalNumber);
std::raise(SIGABRT);
// Let's not loop on this...
std::signal(signalNumber, nullptr);
std::raise(signalNumber);
};
std::signal(SIGTERM, signalHandler);