libassa 3.5.1
Loading...
Searching...
No Matches
Classes | Namespaces
SigHandler.h File Reference

Class SigHandler is a UNIX signal handlers manager/dispatcher class. More...

#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"

Go to the source code of this file.

Classes

class  ASSA::SigHandler
 

Namespaces

namespace  ASSA
 

Detailed Description

Class SigHandler is a UNIX signal handlers manager/dispatcher class.

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.