UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
process_observer.hpp
1 /* process_observer.hpp */
2 /* $Id$ */
3 #ifndef __process_observer_hpp
4 #define __process_observer_hpp
5 
6 #ifdef GE_BUILD
7 #include <types.hpp>
8 #else
9 #include <dcf/types.hpp>
10 #endif
11 
12 namespace dcf
13 {
16  {
17  public:
18 
21 
23  virtual ~ProcessObserver();
24 
27 
29  void stop();
30 
32  pid_t getProcPID() {return m_proc_pid;}
33 
35  pid_t getObserverPID() {return m_observer_pid;}
36 
37  protected:
38 
41 
43  pid_t m_proc_pid;
44 
46  virtual void procDeadAction();
47 
48  private:
49 
51  static const unsigned long m_delay = 300000;
52 
54  static void (*signal_action(int sig_id, void (*sig_hndlr)(int sig_id)))(int sig_id);
55 
57  static void signal_handler(int sig_id);
58  };
59 };
60 
61 #endif /* process_observer.hpp */
error_t
Definition: types.hpp:11
pid_t getObserverPID()
Definition: process_observer.hpp:35
Definition: process_observer.hpp:15
pid_t m_observer_pid
Definition: process_observer.hpp:40
virtual ~ProcessObserver()
dcf::error_t start()
virtual void procDeadAction()
pid_t getProcPID()
Definition: process_observer.hpp:32