Continued ripping up the source.
[aesalon.git] / monitor / src / ptrace / SegfaultObserver.cpp
blob846ea419a70a70556b317b2ece20599c92ccedfa
1 #include <signal.h>
2 #include "SegfaultObserver.h"
3 #include "Initializer.h"
4 #include "Message.h"
6 namespace Aesalon {
7 namespace Monitor {
8 namespace PTrace {
10 bool SegfaultObserver::handle_signal(int signal, int status) {
11 if(signal == SIGSEGV) {
12 Initializer::get_instance()->get_program_manager()->set_running(false);
13 Message::Message(Message::WARNING_MESSAGE, "Program received SIGSEGV, aborting");
14 return true;
17 return false;
20 } // namespace PTrace
21 } // namespace Monitor
22 } // namespace Aesalon