libassa 3.5.1
|
#include <SigHandlers.h>
Public Member Functions | |
virtual int | install (int signum_, EventHandler *new_hand_, SigAction *new_disp_=0, EventHandler **old_hand_=0, SigAction *old_disp_=0) |
Register EventHandler with dispatching system. | |
virtual int | remove (int signum_, EventHandler *eh_, SigAction *new_disp_=0, SigAction *old_disp_=0) |
Remove EventHandler from the list of registered handler for signum_. | |
![]() | |
virtual | ~SigHandler () |
No-op virtual destructor. | |
EventHandler * | handler (int signum_, EventHandler *new_) |
Set new event handler for signal signum_ and return an existing one. | |
EventHandler * | handler (int signum_) |
Retrieve current event handler for signum_. | |
Static Public Member Functions | |
static void | sighandlers_dispatcher (int signum_) |
A wrapper around static SigHandlers::dispatch(). | |
![]() | |
static void | dispatch (int signum_) |
Here is the heart of SigHandler class. | |
Static Private Member Functions | |
static void | dispatch (int signum_) |
The heart of SigHandlers class - this callback function is really registered with OS to catch all of the signals for which event handler has been installed. | |
Additional Inherited Members | |
![]() | |
int | in_range (int signum_) |
Check that signum_ is in valid range. | |
Definition at line 55 of file SigHandlers.h.
The heart of SigHandlers class - this callback function is really registered with OS to catch all of the signals for which event handler has been installed.
Appropriate EventHandler(s) are then notified.
Definition at line 236 of file SigHandlers.cpp.
References ASSA::SigHandlersList::instance(), ASSA::SIGHAND, and trace_with_mask.
Referenced by sighandlers_dispatcher().
|
virtual |
Register EventHandler with dispatching system.
signum_ | (In ) Signal number. |
new_hand_ | (In ) Pointer to new event handler to install. |
new_disp_ | (In=0 ) New disposition to use to handle signal. |
old_hand_ | (Out=0) Placeholder for old event handler. |
old_disp_ | (Out=0) Placeholder for old disposition. |
Reimplemented from ASSA::SigHandler.
Definition at line 35 of file SigHandlers.cpp.
References ASSA::ASSAERR, DL, EL, ASSA::SigHandler::in_range(), ASSA::SigHandlersList::instance(), ASSA::SIGHAND, sighandlers_dispatcher(), and trace_with_mask.
Referenced by ASSA::GenServer::init().
|
virtual |
Remove EventHandler from the list of registered handler for signum_.
If eh_ is NULL, then all EventHandler(s) will be removed from the list, and object will go back to passive mode in which no signal handling is done via SigHandlers class dispatcher. If new_disp_ is omitted, SIG_DFL will be used instead.
signum_ | (In ) Signal number. |
eh_ | (In ) Event handler to remove. |
new_disp_ | (In=0 ) New disposition to use to handle signal. |
old_disp_ | (Out=0) Placeholder for old disposition. |
Reimplemented from ASSA::SigHandler.
Definition at line 166 of file SigHandlers.cpp.
References ASSA::ASSAERR, DL, EL, ASSA::SigHandler::in_range(), ASSA::SigHandlersList::instance(), ASSA::SIGHAND, and trace_with_mask.
A wrapper around static SigHandlers::dispatch().
It is needed for the purpose of differentiation it with other signal handlers that might be installed by user's code.
signum_ | Dispatch event handlers for this signal. |
Definition at line 25 of file SigHandlers.cpp.
References dispatch(), DL, ASSA::SIGHAND, and trace_with_mask.
Referenced by install().