feat: handle ctrl-c for this program

This commit is contained in:
kradchen
2025-07-11 10:41:17 +08:00
parent 0852e076b3
commit 1435dcb94e

View File

@@ -1,3 +1,7 @@
#include <csignal>
#include <cstdlib>
#include "Parser.h"
#include "Parser.h"
#include <cstdio>
@@ -9,6 +13,10 @@
#include "log/log.h"
#include "config/config.h"
void handle_ctrlC(int signal){
exit(0);
}
/* 0 is data path.
1 is dataRef path.
2 is output path.
@@ -17,6 +25,9 @@
int main(int argc, char *argv[])
{
signal(SIGINT, handle_ctrlC);
int argNum = 5;
std::vector<std::string> args(argNum);
args[0] = "/home/sun/20230418T145123/";