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

Diff of /lbbs/src/common.c

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

Revision 1.30 by sysadm, Mon Jun 16 14:32:25 2025 UTC Revision 1.35 by sysadm, Thu Jun 26 12:17:02 2025 UTC
# Line 14  Line 14 
14   *                                                                         *   *                                                                         *
15   ***************************************************************************/   ***************************************************************************/
16    
 #define _POSIX_C_SOURCE 200112L  
   
17  #include "common.h"  #include "common.h"
18  #include "log.h"  #include "log.h"
19  #include "menu.h"  #include "menu.h"
20    #include <signal.h>
21  #include <string.h>  #include <string.h>
22  #include <time.h>  #include <time.h>
 #include <signal.h>  
23  #include <sys/types.h>  #include <sys/types.h>
24    
25  // File loader  // File loader
# Line 54  volatile int SYS_server_exit = 0; Line 52  volatile int SYS_server_exit = 0;
52  volatile int SYS_child_process_count = 0;  volatile int SYS_child_process_count = 0;
53  volatile int SYS_child_exit = 0;  volatile int SYS_child_exit = 0;
54  volatile int SYS_conf_reload = 0;  volatile int SYS_conf_reload = 0;
 volatile int SYS_data_file_reload = 0;  
 volatile int SYS_section_list_reload = 0;  
55    
56  static const char *weekday[] = {  static const char *weekday[] = {
57          "天", "一", "二", "三", "四", "五", "六"};          "天", "一", "二", "三", "四", "五", "六"};
# Line 83  const char *get_time_str(char *s, size_t Line 79  const char *get_time_str(char *s, size_t
79  void sig_hup_handler(int i)  void sig_hup_handler(int i)
80  {  {
81          SYS_conf_reload = 1;          SYS_conf_reload = 1;
         SYS_data_file_reload = 1;  
         SYS_section_list_reload = 1;  
82  }  }
83    
84  void sig_term_handler(int i)  void sig_term_handler(int i)
85  {  {
86          SYS_server_exit = 1;          SYS_server_exit = 1;
         signal(SIGTERM, SIG_IGN);  
87  }  }
88    
89  void sig_chld_handler(int i)  void sig_chld_handler(int i)


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

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