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

SigHandlers is a signal handlers manager. More...

#include <signal.h>
#include <errno.h>
#include <sys/time.h>
#include <sys/types.h>
#include "assa/SigHandler.h"
#include "assa/SigHandlersList.h"
#include "assa/Handlers.h"

Go to the source code of this file.

Classes

class  ASSA::SigHandlers
 

Namespaces

namespace  ASSA
 

Detailed Description

SigHandlers is a signal handlers manager.

SigHandlers class extends SigHandler class by allowing user to register multiple EventHandlers per signal. It also preserves signal handlers installed by the third-party software.

Initially the state of SigHandlers object is passive. No special dispatching is done. User can use other means (such as

See also
SigAction) to register C-function as signal handler.

When register() method is called for the first EventHandler, the state of SigHandlers object changes to active, and SigHandlers dispatcher takes over the control on how signals are dispatched. Each EventHandler is added to the list of handlers. When signal is delivered, all handlers on that list will be notified.

If third party library (or application code) has installed its own signal handler (C-function) prior to the first EventHandler registration, it will be placed among all other registered EventHandlers and notified too when signal is delivered to the process by OS.

Definition in file SigHandlers.h.