| 30 |
int section_list_loader_pid; |
int section_list_loader_pid; |
| 31 |
int last_article_op_log_mid; |
int last_article_op_log_mid; |
| 32 |
|
|
| 33 |
|
static void loader_proc_sig_usr1_handler(int i) |
| 34 |
|
{ |
| 35 |
|
// Restart log |
| 36 |
|
if (log_restart() < 0) |
| 37 |
|
{ |
| 38 |
|
log_error("Restart logging failed\n"); |
| 39 |
|
} |
| 40 |
|
} |
| 41 |
|
|
| 42 |
int load_section_config_from_db(int update_gen_ex) |
int load_section_config_from_db(int update_gen_ex) |
| 43 |
{ |
{ |
| 44 |
MYSQL *db = NULL; |
MYSQL *db = NULL; |
| 738 |
{ |
{ |
| 739 |
log_error("set signal action of SIGCHLD error: %d\n", errno); |
log_error("set signal action of SIGCHLD error: %d\n", errno); |
| 740 |
} |
} |
| 741 |
|
act.sa_handler = loader_proc_sig_usr1_handler; |
| 742 |
|
if (sigaction(SIGUSR1, &act, NULL) == -1) |
| 743 |
|
{ |
| 744 |
|
log_error("set signal action of SIGUSR1 error: %d\n", errno); |
| 745 |
|
} |
| 746 |
|
|
| 747 |
// Do section data loader periodically |
// Do section data loader periodically |
| 748 |
while (!SYS_server_exit) |
while (!SYS_server_exit) |