OpenSDN source code
|
#include <process_signal.h>
Public Types | |
typedef boost::function< void(const boost::system::error_code &error, int sig, pid_t pid, int status)> | SignalChildHandler |
typedef boost::function< void(const boost::system::error_code &error, int sig)> | SignalHandler |
typedef std::map< int, std::vector< SignalHandler > > | SignalCallbackMap |
Public Member Functions | |
Signal (EventManager *evm, const SignalCallbackMap &sig_callback_map, const std::vector< SignalChildHandler > &sigchld_callbacks, bool always_handle_sigchild) | |
Signal (EventManager *evm, const SignalCallbackMap &sig_callback_map) | |
virtual | ~Signal () |
void | Initialize () |
void | Terminate () |
void | RegisterHandler (int sig, SignalHandler handler) |
void | RegisterHandler (SignalChildHandler handler) |
Private Member Functions | |
boost::system::error_code | AddSignal (int sig) |
boost::system::error_code | InitializeSigChild () |
void | RegisterSigHandler () |
void | HandleSig (const boost::system::error_code &error, int sig) |
bool | HandleSigOsSpecific (const boost::system::error_code &error, int sig) |
void | NotifySig (const boost::system::error_code &error, int sig) |
void | NotifySigChld (const boost::system::error_code &error, int sig, int pid, int status) |
virtual int | WaitPid (int pid, int *status, int options) |
Private Attributes | |
boost::asio::signal_set | signal_ |
SignalCallbackMap | sig_callback_map_ |
std::vector< SignalChildHandler > | sigchld_callbacks_ |
bool | always_handle_sigchild_ |
Friends | |
class | ::ProcessSignalTest |
Definition at line 21 of file process_signal.h.
typedef std::map<int, std::vector<SignalHandler> > process::Signal::SignalCallbackMap |
Definition at line 28 of file process_signal.h.
typedef boost::function< void(const boost::system::error_code& error, int sig, pid_t pid, int status)> process::Signal::SignalChildHandler |
Definition at line 25 of file process_signal.h.
typedef boost::function< void(const boost::system::error_code& error, int sig)> process::Signal::SignalHandler |
Definition at line 27 of file process_signal.h.
process::Signal::Signal | ( | EventManager * | evm, |
const SignalCallbackMap & | sig_callback_map, | ||
const std::vector< SignalChildHandler > & | sigchld_callbacks, | ||
bool | always_handle_sigchild | ||
) |
process::Signal::Signal | ( | EventManager * | evm, |
const SignalCallbackMap & | sig_callback_map | ||
) |
|
virtual |
Definition at line 37 of file process_signal_common.cc.
|
private |
Definition at line 40 of file process_signal_common.cc.
|
private |
|
private |
void process::Signal::Initialize | ( | ) |
|
private |
|
private |
Definition at line 70 of file process_signal_common.cc.
|
private |
Definition at line 63 of file process_signal_common.cc.
void process::Signal::RegisterHandler | ( | int | sig, |
SignalHandler | handler | ||
) |
void process::Signal::RegisterHandler | ( | SignalChildHandler | handler | ) |
|
private |
void process::Signal::Terminate | ( | ) |
Definition at line 112 of file process_signal_common.cc.
|
privatevirtual |
Definition at line 82 of file process_signal_common.cc.
|
friend |
Definition at line 56 of file process_signal.h.
|
private |
Definition at line 55 of file process_signal.h.
|
private |
Definition at line 53 of file process_signal.h.
|
private |
Definition at line 54 of file process_signal.h.
|
private |
Definition at line 52 of file process_signal.h.