/[LeafOK_CVS]/lbbs/src/section_list_loader.c
ViewVC logotype

Diff of /lbbs/src/section_list_loader.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.17 by sysadm, Wed Jun 4 13:42:53 2025 UTC Revision 1.19 by sysadm, Sat Jun 14 09:20:13 2025 UTC
# Line 16  Line 16 
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"
# Line 30  Line 31 
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    
# Line 636  int section_list_loader_launch(void) Line 635  int section_list_loader_launch(void)
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
# Line 726  int section_list_loader_launch(void) Line 725  int section_list_loader_launch(void)
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                  }                  }


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1