| 16 |
|
|
| 17 |
#include "section_list_loader.h" |
#include "section_list_loader.h" |
| 18 |
#include "article_cache.h" |
#include "article_cache.h" |
| 19 |
|
#include "bbs.h" |
| 20 |
#include "log.h" |
#include "log.h" |
| 21 |
#include "database.h" |
#include "database.h" |
| 22 |
#include "menu.h" |
#include "menu.h" |
| 31 |
#define _POSIX_C_SOURCE 200809L |
#define _POSIX_C_SOURCE 200809L |
| 32 |
#include <string.h> |
#include <string.h> |
| 33 |
|
|
|
#define SECTION_LIST_LOAD_INTERVAL 10 // second |
|
|
|
|
| 34 |
int section_list_loader_pid; |
int section_list_loader_pid; |
| 35 |
int last_article_op_log_mid; |
int last_article_op_log_mid; |
| 36 |
|
|
| 635 |
{ |
{ |
| 636 |
SYS_child_process_count++; |
SYS_child_process_count++; |
| 637 |
section_list_loader_pid = pid; |
section_list_loader_pid = pid; |
| 638 |
log_common("Section list loader process (%d) start\n", pid); |
log_common("Section list loader process (pid = %d) start\n", pid); |
| 639 |
return 0; |
return 0; |
| 640 |
} |
} |
| 641 |
else if (pid < 0) // Error |
else if (pid < 0) // Error |
| 725 |
continue; |
continue; |
| 726 |
} |
} |
| 727 |
|
|
| 728 |
for (i = 0; i < SECTION_LIST_LOAD_INTERVAL && !SYS_server_exit && !SYS_section_list_reload; i++) |
for (i = 0; i < BBS_section_list_load_interval && !SYS_server_exit && !SYS_section_list_reload; i++) |
| 729 |
{ |
{ |
| 730 |
sleep(1); |
sleep(1); |
| 731 |
} |
} |