CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/FWCore/Utilities/interface/UnixSignalHandlers.h

Go to the documentation of this file.
00001 #ifndef FWCore_Utilities_UnixSignalHandlers_h
00002 #define FWCore_Utilities_UnixSignalHandlers_h
00003 
00004 /*----------------------------------------------------------------------
00005 
00006 UnixSignalHandlers: A set of little utility functions to establish
00007 and manipulate Unix-style signal handling.
00008 
00009 ----------------------------------------------------------------------*/
00010 
00011 #include <signal.h>
00012 #include "boost/thread/thread.hpp"
00013 
00014 namespace edm {
00015 
00016     extern boost::mutex usr2_lock;
00017     extern volatile bool shutdown_flag;
00018 
00019     extern "C" {
00020       void ep_sigusr2(int,siginfo_t*,void*);
00021       typedef void(*CFUNC)(int,siginfo_t*,void*);
00022     }
00023 
00024     int getSigNum();
00025     void disableAllSigs(sigset_t* oldset);
00026     void disableRTSigs();
00027     void enableSignal(sigset_t* newset, int signum);
00028     void disableSignal(sigset_t* newset, int signum);
00029     void reenableSigs(sigset_t* oldset);
00030     void installSig(int signum, CFUNC func);
00031     void installCustomHandler(int signum, CFUNC func);
00032     void sigInventory();
00033 
00034 }  // end of namespace edm
00035 #endif