/[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.64 by sysadm, Tue Nov 4 14:58:56 2025 UTC Revision 1.66 by sysadm, Sun Nov 16 02:06:56 2025 UTC
# Line 6  Line 6 
6   * Copyright (C) 2004-2025  Leaflet <leaflet@leafok.com>   * Copyright (C) 2004-2025  Leaflet <leaflet@leafok.com>
7   */   */
8    
9    #ifdef HAVE_CONFIG_H
10    #include "config.h"
11    #endif
12    
13  #include "article_cache.h"  #include "article_cache.h"
14  #include "article_view_log.h"  #include "article_view_log.h"
15  #include "bbs.h"  #include "bbs.h"
# Line 26  Line 30 
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;
# Line 725  int section_list_loader_launch(void) Line 738  int section_list_loader_launch(void)
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)


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

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