libassa
3.5.0
|
Class SIGALRMHandler handles SIGALRM signal. More...
#include <Handlers.h>
Public Member Functions | |
SIGALRMHandler () | |
Constructor. | |
int | handle_signal (int signum_) |
Receive ALRM signal. | |
sig_atomic_t | alarmed () |
Has alarm gone off? | |
void | resetState () |
Reset internal state. | |
Private Attributes | |
sig_atomic_t | m_alarm_flag |
Indicator whether alarm gone off yet. |
Class SIGALRMHandler handles SIGALRM signal.
Definition at line 221 of file Handlers.h.
ASSA::SIGALRMHandler::SIGALRMHandler | ( | ) | [inline] |
Constructor.
Definition at line 225 of file Handlers.h.
References ASSA::SIGHAND, and trace_with_mask.
: m_alarm_flag(0) { trace_with_mask("SIGALRMHandler::SIGALRMHandler", SIGHAND); }
sig_atomic_t ASSA::SIGALRMHandler::alarmed | ( | ) | [inline] |
Has alarm gone off?
Definition at line 242 of file Handlers.h.
References m_alarm_flag.
{ return m_alarm_flag; }
int ASSA::SIGALRMHandler::handle_signal | ( | int | signum_ | ) | [inline, virtual] |
Receive ALRM signal.
Reimplemented from ASSA::EventHandler.
Definition at line 231 of file Handlers.h.
References m_alarm_flag, ASSA::SIGHAND, and trace_with_mask.
{ trace_with_mask("SIGALRMHandler::handle_signal", SIGHAND); if (signum_ == SIGALRM) { m_alarm_flag = 1; // notice that we have seen alarm return 0; } return -1; }
void ASSA::SIGALRMHandler::resetState | ( | void | ) | [inline, virtual] |
Reset internal state.
Reimplemented from ASSA::EventHandler.
Definition at line 245 of file Handlers.h.
References m_alarm_flag.
{ m_alarm_flag = 0; }
sig_atomic_t ASSA::SIGALRMHandler::m_alarm_flag [private] |
Indicator whether alarm gone off yet.
Definition at line 249 of file Handlers.h.
Referenced by alarmed(), handle_signal(), and resetState().