libmoost
moost::signal::signal_handler Class Reference

#include <signal_handler.h>

Inheritance diagram for moost::signal::signal_handler:
Collaboration diagram for moost::signal::signal_handler:

List of all members.

Classes

class  impl

Public Member Functions

 signal_handler (const boost::function< void(int)> &callback)

Private Attributes

boost::shared_ptr< implm_pimpl

Detailed Description

Intercepts SIGHUP, SIGTERM, and SIGINT signals and passes them to the provided callback function.

Definition at line 42 of file signal_handler.h.


Constructor & Destructor Documentation

signal_handler::signal_handler ( const boost::function< void(int)> &  callback)

Constructs a signal_handler

Parameters:
callbackthe function to call when a signal is intercepted

callback is void(int) and takes the signal recieved, or -1 if there was an error waiting for a signal

Definition at line 60 of file signal_handler.cpp.


Member Data Documentation

boost::shared_ptr<impl> moost::signal::signal_handler::m_pimpl [private]

Definition at line 46 of file signal_handler.h.


The documentation for this class was generated from the following files: