|
libassa 3.5.0
|
SIGINTHandler handles SIGINT signal. More...
#include <Handlers.h>
Public Member Functions | |
| SIGINTHandler () | |
| constructor | |
| int | handle_signal (int signum_) |
| Receive SIGINT signal. | |
| sig_atomic_t | graceful_quit () |
| Indicates whether graceful quit signal has been raised by the signal handler. | |
| void | resetState () |
| Reset state of the object to initial. | |
Private Attributes | |
| sig_atomic_t | m_graceful_quit |
| flag that indicates whether signal was caught. | |
SIGINTHandler handles SIGINT signal.
Definition at line 45 of file Handlers.h.
| ASSA::SIGINTHandler::SIGINTHandler | ( | ) | [inline] |
constructor
Definition at line 72 of file Handlers.h.
References ASSA::SIGHAND, and trace_with_mask.
: m_graceful_quit (0) { trace_with_mask("SIGINTHandler::SIGINTHandler", SIGHAND); }
| sig_atomic_t ASSA::SIGINTHandler::graceful_quit | ( | ) | [inline] |
Indicates whether graceful quit signal has been raised by the signal handler.
Definition at line 93 of file Handlers.h.
References m_graceful_quit.
{
return m_graceful_quit;
}
| int ASSA::SIGINTHandler::handle_signal | ( | int | signum_ | ) | [inline, virtual] |
Receive SIGINT signal.
Reimplemented from ASSA::EventHandler.
Definition at line 80 of file Handlers.h.
References m_graceful_quit, ASSA::SIGHAND, and trace_with_mask.
{
trace_with_mask("SIGINTHandler::handle_signal", SIGHAND);
if (signum_ == SIGINT) {
m_graceful_quit = 1;
return 0;
}
return -1;
}
| void ASSA::SIGINTHandler::resetState | ( | void | ) | [inline, virtual] |
Reset state of the object to initial.
Reimplemented from ASSA::EventHandler.
Definition at line 100 of file Handlers.h.
References m_graceful_quit, ASSA::SIGHAND, and trace_with_mask.
{
trace_with_mask("SIGINTHandler::resetState", SIGHAND);
m_graceful_quit = 0;
}
sig_atomic_t ASSA::SIGINTHandler::m_graceful_quit [private] |
flag that indicates whether signal was caught.
Definition at line 67 of file Handlers.h.
Referenced by graceful_quit(), handle_signal(), and resetState().
1.7.3