OCT 1. 屏蔽SIGPIPE进程退出,增加事件捕获调试信息
This commit is contained in:
parent
13b447daac
commit
d91e80acb3
|
@ -32,10 +32,10 @@
|
|||
static pid_t g_pid;
|
||||
static int g_isInited = FALSE;
|
||||
|
||||
static void catch_system_interupt(int UNUSED(sig_num)) {
|
||||
static void catch_system_interupt(int sig_num) {
|
||||
if (g_pid == uv_os_getpid()) {
|
||||
printf("\n");
|
||||
LOG_MOD(warn, ZLOG_MOD_INIT, "System close, clearing system resources..........\n\n");
|
||||
LOG_MOD(warn, ZLOG_MOD_INIT, "(%d): System close, clearing system resources..........\n\n", sig_num);
|
||||
task_manager_exit();
|
||||
sleep(1);
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ int user_init(const char *pAppCfgFile, const char *pCfgDirectory, const char *pK
|
|||
signal(SIGQUIT, catch_system_interupt);
|
||||
signal(SIGTSTP, catch_system_interupt);
|
||||
signal(SIGHUP, SIG_IGN);
|
||||
signal(SIGPIPE, catch_system_interupt);
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
signal(SIGKILL, catch_system_interupt);
|
||||
|
||||
// 初始化 libuv loop
|
||||
|
@ -107,16 +107,8 @@ int user_init(const char *pAppCfgFile, const char *pCfgDirectory, const char *pK
|
|||
return -ERR_CONFIG_INIT;
|
||||
}
|
||||
|
||||
LOG_MOD(info,
|
||||
ZLOG_MOD_INIT,
|
||||
"%s library version %s information: %s (Build: %s %s GCC Ver:%s) With %lu(bits) OS\n",
|
||||
VCPE_LIB_NAME,
|
||||
VCPE_LIB_VER,
|
||||
VCPE_GIT_VERSION,
|
||||
__DATE__,
|
||||
__TIME__,
|
||||
__VERSION__,
|
||||
sizeof(int *) * 8);
|
||||
LOG_MOD(info, ZLOG_MOD_INIT, "%s library version %s information: %s (Build: %s %s GCC Ver:%s) With %lu(bits) OS\n",
|
||||
VCPE_LIB_NAME, VCPE_LIB_VER, VCPE_GIT_VERSION, __DATE__, __TIME__, __VERSION__, sizeof(int *) * 8);
|
||||
|
||||
LOG_MOD(info, ZLOG_MOD_INIT, "Application build configure: [%s]\n", VCPE_BUILD_CONFIG);
|
||||
|
||||
|
|
Loading…
Reference in New Issue