COSC_4P82_Assignment_1/lib/beagle-3.0.3/tests/TransportTCPIPOp/DefaultSignalHandler.cpp

24 lines
437 B
C++
Raw Normal View History

2024-02-13 21:21:51 -05:00
#include "DefaultSignalHandler.hpp"
DefaultSignalHandler::DefaultSignalHandler()
{
setCustomAction(eSigInt);
setCustomAction(eSigTerm);
}
DefaultSignalHandler::~DefaultSignalHandler()
{}
void
DefaultSignalHandler::main(SignalType inSignalNumber)
{
switch(inSignalNumber) {
case eSigInt:
case eSigTerm:
throw "This is the default signal handler cleaning things up.";
break;
default:
break;
}
}