#include <signal.h>
#include <errno.h>
#include "assa/Logger.h"
#include "assa/IdSet.h"
#include "assa/SigSet.h"
#include "assa/SigAction.h"
#include "assa/EventHandler.h"
Include dependency graph for SigHandler.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Namespaces | |
namespace | ASSA |
Classes | |
class | ASSA::SigHandler |
It plays a role of centralized signal dispatcher for the running application. It is based on Callback pattern that overcomes two major difficulties of using UNIX signals in C++ programs:
SigHandler class allows to install one EventHandler object in order to manage application's reaction for UNIX signals. When this registered signal is delivered by OS to the running application, handle_signal() method of the installed EventHandler will be called for service.
If conventional C-like signal handler has been installed prior to calling sh.install(), it will be lost irreversibly.
Definition in file SigHandler.h.