From 49a421736c8ee76ab5d42a1f92c2697a3bacbe51 Mon Sep 17 00:00:00 2001
From: Nicolas Pope <nwpope@utu.fi>
Date: Tue, 13 Aug 2019 09:56:07 +0300
Subject: [PATCH] Double ctrl-c fast exit

---
 components/common/cpp/src/configuration.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/components/common/cpp/src/configuration.cpp b/components/common/cpp/src/configuration.cpp
index 991fdc120..f6666eaff 100644
--- a/components/common/cpp/src/configuration.cpp
+++ b/components/common/cpp/src/configuration.cpp
@@ -437,9 +437,14 @@ static void process_options(Configurable *root, const map<string, string> &opts)
 	}
 }
 
+static bool sig_int_called = false;
+
 static void signalIntHandler( int signum ) {
    std::cout << "Closing...\n";
 
+   if (sig_int_called) quick_exit(-1);
+   sig_int_called = true;
+
    // cleanup and close up stuff here  
    // terminate program  
 
-- 
GitLab