mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-15 18:58:41 +01:00
moving set signal handler to network utils
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "sls/ToString.h"
|
||||
#include "sls/container_utils.h"
|
||||
#include "sls/logger.h"
|
||||
#include "sls/network_utils.h"
|
||||
#include "sls/sls_detector_defs.h"
|
||||
|
||||
#include <csignal> //SIGINT
|
||||
@@ -46,9 +47,9 @@ int main(int argc, char *argv[]) {
|
||||
LOG(sls::logINFOBLUE) << "Current Process [ Tid: " << gettid() << " ]";
|
||||
|
||||
// close files on ctrl+c
|
||||
CommandLineOptions::setupSignalHandler(SIGINT, sigInterruptHandler);
|
||||
sls::setupSignalHandler(SIGINT, sigInterruptHandler);
|
||||
// handle locally on socket crash
|
||||
CommandLineOptions::setupSignalHandler(SIGPIPE, SIG_IGN);
|
||||
sls::setupSignalHandler(SIGPIPE, SIG_IGN);
|
||||
|
||||
sem_init(&semaphore, 1, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user