Add Interrupt Signal Handling
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include <QApplication>
|
||||
#include <csignal>
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include "StreamManager.hpp"
|
||||
#include "ImageManager.hpp"
|
||||
@@ -7,14 +8,21 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
void handleClose(int signal)
|
||||
{
|
||||
qApp->exit(14);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
QCoreApplication app(argc, argv);
|
||||
|
||||
//ImageManager image_mgr(&app);
|
||||
//FaultManager fault_mgr(&app);
|
||||
signal(SIGINT, &handleClose);
|
||||
|
||||
FaultManager fault_mgr(&app);
|
||||
ImageManager image_mgr(&app);
|
||||
ConfigManager config_mgr(&app);
|
||||
//StreamManager stream_mgr(&app);
|
||||
StreamManager stream_mgr(&app);
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
Reference in New Issue
Block a user