#include <AlarmHandler.h>
Inheritance diagram for AlarmHandler:
Public Member Functions | |
AlarmHandler (FILE *s) | |
virtual void | handle_signal (int signum) |
virtual | ~AlarmHandler () |
Definition at line 42 of file AlarmHandler.h.
AlarmHandler::AlarmHandler | ( | FILE * | s | ) | [inline] |
Store information to be used by the handler.
s | Write to this stream. |
Definition at line 55 of file AlarmHandler.h.
virtual AlarmHandler::~AlarmHandler | ( | ) | [inline, virtual] |
Definition at line 58 of file AlarmHandler.h.
virtual void AlarmHandler::handle_signal | ( | int | signum | ) | [inline, virtual] |
Handle an alarm signal. When one of our servers gets an alarm, that means it has hit its time out. We need to dump two CRLF pairs down the stream and then send an Error object explaining that a timeout has been reached.
Because this is a signal handler, it should call only re-entrant system services, functions, et cetera. Generally that eliminates stdio functions but I'm using them anyway. This handler never returns to the code that was running when the alarm signal was raised.
signum | We know it is SIGALRM; here as a check |
Implements EventHandler.
Definition at line 75 of file AlarmHandler.h.
References Error::print().
Here is the call graph for this function: