summaryrefslogtreecommitdiffstats
path: root/src/crimson/common/fatal_signal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crimson/common/fatal_signal.h')
-rw-r--r--src/crimson/common/fatal_signal.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/crimson/common/fatal_signal.h b/src/crimson/common/fatal_signal.h
new file mode 100644
index 000000000..626017c93
--- /dev/null
+++ b/src/crimson/common/fatal_signal.h
@@ -0,0 +1,21 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:nil -*-
+// vim: ts=8 sw=2 smarttab
+
+#pragma once
+
+#include <csignal>
+
+class FatalSignal {
+public:
+ FatalSignal();
+
+private:
+ static void signal_entry(int signum, siginfo_t* siginfo, void* p);
+ static void signaled(int signum, const siginfo_t& siginfo);
+
+ template <int... SigNums>
+ void install_oneshot_signals_handler();
+
+ template <int SigNum>
+ void install_oneshot_signal_handler();
+};