GClasses
|
Temporarily handles certain signals. (When this object is destroyed, it puts all the signal handlers back the way they were.) Periodically call "check" to see if a signal has occurred.
#include <GApp.h>
Public Member Functions | |
GSignalHandler () | |
~GSignalHandler () | |
int | check () |
Call this periodically. Returns 0 if no signal has occurred. Otherwise, returns the number of the signal. More... | |
void | onSignal (int sig) |
You can call this to simulate a signal. More... | |
Public Attributes | |
int | m_gotSignal |
sighandler_t | m_prevSigInt |
sighandler_t | m_prevSigPipe |
sighandler_t | m_prevSigSegV |
sighandler_t | m_prevSigTerm |
GClasses::GSignalHandler::GSignalHandler | ( | ) |
GClasses::GSignalHandler::~GSignalHandler | ( | ) |
int GClasses::GSignalHandler::check | ( | ) |
Call this periodically. Returns 0 if no signal has occurred. Otherwise, returns the number of the signal.
void GClasses::GSignalHandler::onSignal | ( | int | sig | ) |
You can call this to simulate a signal.
int GClasses::GSignalHandler::m_gotSignal |
sighandler_t GClasses::GSignalHandler::m_prevSigInt |
sighandler_t GClasses::GSignalHandler::m_prevSigPipe |
sighandler_t GClasses::GSignalHandler::m_prevSigSegV |
sighandler_t GClasses::GSignalHandler::m_prevSigTerm |