CMS 3D CMS Logo

UnixSignalHandlers.h
Go to the documentation of this file.
1 #ifndef FWCore_Utilities_UnixSignalHandlers_h
2 #define FWCore_Utilities_UnixSignalHandlers_h
3 
4 /*----------------------------------------------------------------------
5 
6 UnixSignalHandlers: A set of little utility functions to establish
7 and manipulate Unix-style signal handling.
8 
9 ----------------------------------------------------------------------*/
10 
11 #include <signal.h>
12 #include <atomic>
13 
14 namespace edm {
15 
16  extern volatile std::atomic<bool> shutdown_flag;
17 
18  extern "C" {
19  void ep_sigusr2(int,siginfo_t*,void*);
20  typedef void(*CFUNC)(int,siginfo_t*,void*);
21  }
22 
23  void disableAllSigs(sigset_t* oldset);
24  void disableRTSigs();
25  void enableSignal(sigset_t* newset, int signum);
26  void disableSignal(sigset_t* newset, int signum);
27  void reenableSigs(sigset_t* oldset);
28  void installSig(int signum, CFUNC func);
29  void installCustomHandler(int signum, CFUNC func);
30  void sigInventory();
31 
32 } // end of namespace edm
33 #endif
void installSig(int signum, CFUNC func)
void disableAllSigs(sigset_t *oldset)
volatile std::atomic< bool > shutdown_flag
void installCustomHandler(int signum, CFUNC func)
void enableSignal(sigset_t *newset, int signum)
void reenableSigs(sigset_t *oldset)
void disableSignal(sigset_t *newset, int signum)
void sigInventory()
void(* CFUNC)(int, siginfo_t *, void *)
HLT enums.
void ep_sigusr2(int, siginfo_t *, void *)
void disableRTSigs()