00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _FATALSIGNALS_H_
00018 #define _FATALSIGNALS_H_
00019
00020 namespace oasys {
00021
00022 class FatalSignals {
00023 public:
00027 static void init(const char* appname);
00028
00032 static void cancel();
00033
00038 static void set_core_dir(const char* dir)
00039 {
00040 core_dir_ = dir;
00041 }
00042
00046 static void die() __attribute__((noreturn));
00047
00048 protected:
00050 static void handler(int sig);
00051
00053 static const char* appname_;
00054
00056 static const char* core_dir_;
00057
00060 static bool in_abort_handler_;
00061 };
00062
00063 }
00064
00065
00066 #endif