moving set signal handler to network utils

This commit is contained in:
2025-07-11 10:52:08 +02:00
parent 2698087efa
commit 09709f0f96
7 changed files with 24 additions and 21 deletions

View File

@@ -10,6 +10,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
@@ -524,9 +525,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);
semaphores.resize(f.numReceivers);
for (auto &s : semaphores) {