posix/coil/Signal.cpp
Go to the documentation of this file.
1 // -*- C++ -*-
20 #include <coil/config_coil.h>
21 #include <coil/Signal.h>
22 #include <string.h>
23 
24 #ifdef COIL_OS_FREEBSD
25 #define _SIGSET_NWORDS _SIG_WORDS
26 #endif
27 
28 namespace coil
29 {
38  : m_handle(0), m_signum(0), m_mask(0), m_flags(0)
39  {
40  }
41 
54  : m_handle(handle), m_signum(signum), m_mask(0), m_flags(0)
55  {
56  struct sigaction action;
57  memset(&action, 0, sizeof(action)); // clear.
58  action.sa_handler = m_handle;
59 
60  signal(m_signum, SIG_IGN);
61  if (sigaction(m_signum, &action, 0) < 0)
62  {
63  signal(m_signum, SIG_DFL);
64  m_handle = 0;
65  m_signum = 0;
66  m_mask = 0;
67  m_flags = 0;
68  }
69  }
70 
79  {
80  signal(m_signum, SIG_DFL);
81  m_handle = 0;
82  m_signum = 0;
83  m_mask = 0;
84  m_flags = 0;
85  }
86 
87 };
~SignalAction()
Destructor.
SignalHandler m_handle
void(* SignalHandler)(int)
SignalAction()
Constructor.
Common Object Interface Layer.


openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Feb 28 2022 23:00:45