CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 "boost/thread/thread.hpp"
13 
14 namespace edm {
15 
16  extern boost::mutex usr2_lock;
17  extern volatile bool shutdown_flag;
18 
19  extern "C" {
20  void ep_sigusr2(int,siginfo_t*,void*);
21  typedef void(*CFUNC)(int,siginfo_t*,void*);
22  }
23 
24  int getSigNum();
25  void disableAllSigs(sigset_t* oldset);
26  void disableRTSigs();
27  void enableSignal(sigset_t* newset, int signum);
28  void disableSignal(sigset_t* newset, int signum);
29  void reenableSigs(sigset_t* oldset);
30  void installSig(int signum, CFUNC func);
31  void installCustomHandler(int signum, CFUNC func);
32  void sigInventory();
33 
34 } // end of namespace edm
35 #endif
void installSig(int signum, CFUNC func)
void disableAllSigs(sigset_t *oldset)
static boost::mutex mutex
Definition: LHEProxy.cc:11
int getSigNum()
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 ep_sigusr2(int, siginfo_t *, void *)
volatile bool shutdown_flag
void(* CFUNC)(int, siginfo_t *, void *)
boost::mutex usr2_lock
void disableRTSigs()