GClasses

GClasses::GSignalHandler Class Reference

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. More...

#include <GApp.h>

List of all members.

Public Member Functions

 GSignalHandler ()
 ~GSignalHandler ()
int check ()
 Call this periodically. Returns 0 if no signal has occurred. Otherwise, returns the number of the signal.
void onSignal (int sig)
 You can call this to simulate a signal.

Public Attributes

sighandler_t m_prevSigInt
sighandler_t m_prevSigTerm
sighandler_t m_prevSigPipe
sighandler_t m_prevSigSegV
int m_gotSignal

Detailed Description

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.


Constructor & Destructor Documentation

GClasses::GSignalHandler::GSignalHandler ( )
GClasses::GSignalHandler::~GSignalHandler ( )

Member Function Documentation

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.


Member Data Documentation