Main Page
Namespaces
Classes
Files
File List
File Members
src
lib
coil
posix
coil
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
{
37
SignalAction::SignalAction
()
38
: m_handle(0), m_signum(0), m_mask(0), m_flags(0)
39
{
40
}
41
53
SignalAction::SignalAction
(
SignalHandler
handle,
int
signum)
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
78
SignalAction::~SignalAction
()
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
};
coil::SignalAction::~SignalAction
~SignalAction()
Destructor.
Definition:
posix/coil/Signal.cpp:78
coil::SignalAction::m_handle
SignalHandler m_handle
Definition:
posix/coil/Signal.h:105
coil::SignalAction::m_flags
int m_flags
Definition:
posix/coil/Signal.h:108
coil::SignalAction::m_mask
sigset_t * m_mask
Definition:
posix/coil/Signal.h:107
coil::SignalHandler
void(* SignalHandler)(int)
Definition:
ace/coil/Signal.h:35
coil::SignalAction::SignalAction
SignalAction()
Constructor.
Definition:
posix/coil/Signal.cpp:37
config_coil.h
coil::SignalAction::m_signum
int m_signum
Definition:
posix/coil/Signal.h:106
coil
Common Object Interface Layer.
Definition:
ace/coil/Condition.cpp:22
openrtm_aist
Author(s): Noriaki Ando
autogenerated on Mon Jun 10 2019 14:07:56