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 <csignal>
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
edm::disableSignal
void disableSignal(sigset_t *newset, int signum)
Definition: UnixSignalHandlers.cc:86
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::sigInventory
void sigInventory()
Definition: UnixSignalHandlers.cc:135
edm::CFUNC
void(* CFUNC)(int, siginfo_t *, void *)
Definition: UnixSignalHandlers.h:20
edm::ep_sigusr2
void ep_sigusr2(int, siginfo_t *, void *)
Definition: UnixSignalHandlers.cc:25
edm::shutdown_flag
volatile std::atomic< bool > shutdown_flag
Definition: UnixSignalHandlers.cc:22
edm::enableSignal
void enableSignal(sigset_t *newset, int signum)
Definition: UnixSignalHandlers.cc:79
edm::disableRTSigs
void disableRTSigs()
Definition: UnixSignalHandlers.cc:47
createfilelist.int
int
Definition: createfilelist.py:10
TrackCollections2monitor_cff.func
func
Definition: TrackCollections2monitor_cff.py:359
edm::reenableSigs
void reenableSigs(sigset_t *oldset)
Definition: UnixSignalHandlers.cc:72
funct::void
TEMPL(T2) struct Divides void
Definition: Factorize.h:29
edm::installCustomHandler
void installCustomHandler(int signum, CFUNC func)
Definition: UnixSignalHandlers.cc:93
edm::disableAllSigs
void disableAllSigs(sigset_t *oldset)
Definition: UnixSignalHandlers.cc:38
edm::installSig
void installSig(int signum, CFUNC func)
Definition: UnixSignalHandlers.cc:105