summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 463d44d..ab8cc6c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -9,6 +9,10 @@ static void handleSignal(int sig) {
switch (sig) {
default:
+ // quick_exit(less cleanup) if the cleanup took too long
+ signal(SIGALRM, [](int) { std::quick_exit(1); });
+ alarm(5);
+
std::exit(0);
break;
}