mirror of
https://github.com/simon987/sist2.git
synced 2025-04-19 10:16:42 +00:00
null checks in sig_handler
This commit is contained in:
parent
c5ac89813f
commit
85d67a9393
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
ScanCtx_t ScanCtx = {
|
ScanCtx_t ScanCtx = {
|
||||||
.stat_index_size = 0,
|
.stat_index_size = 0,
|
||||||
|
.dbg_current_files = NULL,
|
||||||
|
.pool = NULL
|
||||||
};
|
};
|
||||||
WebCtx_t WebCtx;
|
WebCtx_t WebCtx;
|
||||||
IndexCtx_t IndexCtx;
|
IndexCtx_t IndexCtx;
|
||||||
|
@ -43,6 +43,7 @@ void sig_handler(int signum) {
|
|||||||
LOG_ERROR("*SIGNAL HANDLER*", "=============================================\n\n");
|
LOG_ERROR("*SIGNAL HANDLER*", "=============================================\n\n");
|
||||||
LOG_ERRORF("*SIGNAL HANDLER*", "Uh oh! Caught fatal signal: %s", strsignal(signum));
|
LOG_ERRORF("*SIGNAL HANDLER*", "Uh oh! Caught fatal signal: %s", strsignal(signum));
|
||||||
|
|
||||||
|
if (ScanCtx.dbg_current_files != NULL) {
|
||||||
GHashTableIter iter;
|
GHashTableIter iter;
|
||||||
g_hash_table_iter_init(&iter, ScanCtx.dbg_current_files);
|
g_hash_table_iter_init(&iter, ScanCtx.dbg_current_files);
|
||||||
|
|
||||||
@ -65,8 +66,15 @@ void sig_handler(int signum) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ScanCtx.pool != NULL) {
|
||||||
tpool_dump_debug_info(ScanCtx.pool);
|
tpool_dump_debug_info(ScanCtx.pool);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IndexCtx.pool != NULL) {
|
||||||
|
tpool_dump_debug_info(IndexCtx.pool);
|
||||||
|
}
|
||||||
|
|
||||||
LOG_INFO(
|
LOG_INFO(
|
||||||
"*SIGNAL HANDLER*",
|
"*SIGNAL HANDLER*",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user