fawkes::SignalManager Class Reference

System signal manager. More...

#include <utils/system/signal.h>

List of all members.

Static Public Member Functions

static SignalManagerinstance ()
 Get the SignalManager instance.
static void finalize ()
 Finalize (and free) the SignalManager instance, this does NOT implicitly delete the signal handlers, you have to do this by yourself.
static SignalHandlerregister_handler (int signum, SignalHandler *handler)
 Register a SignalHandler for a signal.
static void unregister_handler (int signum)
 Unregister a SignalHandler for a signal.
static void unregister_handler (SignalHandler *handler)
 Unregister a SignalHandler for a signal.
static void ignore (int signum)
 Ignore a signal.


Detailed Description

System signal manager.

This class dispatches signals received from the system to the appropriate handlers or sets a signal to be ignored. This class is never instantiated but rather you just register a handler. After you are done with signal handling call finalize() to free the use resources and de-register all signal handlers at once.

Author:
Tim Niemueller

Definition at line 42 of file signal.h.


Member Function Documentation

void fawkes::SignalManager::finalize (  )  [static]

Finalize (and free) the SignalManager instance, this does NOT implicitly delete the signal handlers, you have to do this by yourself.

Definition at line 98 of file signal.cpp.

void fawkes::SignalManager::ignore ( int  signum  )  [static]

Ignore a signal.

Parameters:
signum The signal number from <signal.h>

Definition at line 182 of file signal.cpp.

SignalManager * fawkes::SignalManager::instance (  )  [static]

Get the SignalManager instance.

Returns:
SignalManager instance

Definition at line 81 of file signal.cpp.

SignalHandler * fawkes::SignalManager::register_handler ( int  signum,
SignalHandler handler 
) [static]

Register a SignalHandler for a signal.

Parameters:
signum The signal number from <signal.h>
handler The SignalHandler that should handle this event
Returns:
The SignalManager registered before, maybe NULL if there was none

Definition at line 116 of file signal.cpp.

void fawkes::SignalManager::unregister_handler ( SignalHandler handler  )  [static]

Unregister a SignalHandler for a signal.

Parameters:
handler The SignalHandler you want to unregister, will unregister all signals this handler was registered for

Definition at line 151 of file signal.cpp.

void fawkes::SignalManager::unregister_handler ( int  signum  )  [static]

Unregister a SignalHandler for a signal.

Parameters:
signum The signal number from <signal.h>

Definition at line 140 of file signal.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Feb 22 13:32:55 2011 for Fawkes API by  doxygen 1.4.7