summaryrefslogtreecommitdiffstats
path: root/src/crimson/common/fatal_signal.h
blob: 626017c93087066e424fa0a3c83dab0fea8be436 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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();
};