process SIGTERM signal

This commit is contained in:
xiongguangjie 2023-09-09 00:29:43 +08:00
parent c62361a6d6
commit 6c67c6fc67
1 changed files with 6 additions and 0 deletions

View File

@ -420,6 +420,12 @@ int start_main(int argc,char *argv[]) {
sem.post();
}); // 设置退出信号
signal(SIGTERM,[](int) {
WarnL << "SIGINT:exit";
signal(SIGTERM, SIG_IGN);
sem.post();
});
#if !defined(_WIN32)
signal(SIGHUP, [](int) { mediakit::loadIniConfig(g_ini_file.data()); });
#endif