00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef _SigHandlers_h
00014 #define _SigHandlers_h
00015
00016
00017
00018 #include <signal.h>
00019 #include <errno.h>
00020 #include <sys/time.h>
00021 #include <sys/types.h>
00022
00023 #include "assa/SigHandler.h"
00024 #include "assa/SigHandlersList.h"
00025 #include "assa/Handlers.h"
00026
00027 namespace ASSA {
00028
00029 #if !defined(WIN32)
00030
00055 class SigHandlers : public SigHandler
00056 {
00057 public:
00063 static void sighandlers_dispatcher (int signum_);
00064
00075 virtual int install (int signum_,
00076 EventHandler* new_hand_,
00077 SigAction* new_disp_ = 0,
00078 EventHandler** old_hand_ = 0,
00079 SigAction* old_disp_ = 0);
00080
00097 virtual int remove (int signum_,
00098 EventHandler* eh_,
00099 SigAction* new_disp_ = 0,
00100 SigAction* old_disp_ = 0);
00101 private:
00107 static void dispatch (int signum_);
00108 };
00109
00110 #endif // !defined(WIN32)
00111
00112 }
00113
00114 #endif