-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInterruptHandler.h
52 lines (37 loc) · 1.14 KB
/
InterruptHandler.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/***************************************************************************
InterruptHandler.h - description
-------------------
begin : Tue Jan 31 2006
copyright : (C) 2005 by Knut-Helge Vik
email : knuthelv@ifi.uio.no
***************************************************************************/
#ifndef BaseLib_InterruptHandler_h_IsIncluded
#define BaseLib_InterruptHandler_h_IsIncluded
#include <iostream>
#include <string>
#include "BaseLib/Export.h"
namespace BaseLib
{
class DLL_STATE InterruptHandling
{
public:
static void InitSignalHandlers();
static std::string getStackTrace();
protected:
static void HandleInterrupt(int sig);
};
namespace Interrupt
{
//int setup_sigsegv();
//#define CTRL_C_THRESHOLD 3
//static int ctrl_c_threshold;
//static int ctrl_c_counter;
//static std::string abortLogFile;
//void InitializeInterruptHandlers();
//void catch_pipe(int);
//void catch_int(int);
//void catch_segv(int);
//void catch_abrt(int sig_num);
} // Interrupt
}; // BaseLib
#endif // BaseLib_InterruptHandler_h_IsIncluded