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

Diff of /lbbs/src/main.c

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

Revision 1.25 by sysadm, Wed May 7 05:47:49 2025 UTC Revision 1.27 by sysadm, Fri May 9 11:21:11 2025 UTC
# Line 139  int main(int argc, char *argv[]) Line 139  int main(int argc, char *argv[])
139          }          }
140    
141          // Load configuration          // Load configuration
142          if (load_conf("conf/bbsd.conf") < 0)          if (load_conf(CONF_BBSD) < 0)
143            {
144                  exit(-2);                  exit(-2);
145            }
146    
147          // Load menus          // Load menus
148          if (load_menu(&bbs_menu, "conf/menu.conf") < 0)          if (load_menu(&bbs_menu, CONF_MENU) < 0)
149            {
150                    unload_menu(&bbs_menu);
151                  exit(-3);                  exit(-3);
152            }
153    
154          // Set signal handler          // Set signal handler
155          signal(SIGCHLD, child_exit);          signal(SIGHUP, sig_hup_handler);
156          signal(SIGTERM, system_exit);          signal(SIGCHLD, sig_chld_handler);
157          signal(SIG_RELOAD_MENU, reload_bbs_menu);          signal(SIGTERM, sig_term_handler);
158    
159          // Initialize socket server          // Initialize socket server
160          net_server(BBS_address, BBS_port);          net_server(BBS_address, BBS_port);
161    
         // Wait for child process exit  
         while (SYS_child_process_count > 0)  
         {  
                 log_std("Waiting for %d child process to exit\n", SYS_child_process_count);  
                 sleep(1);  
         }  
   
162          // Cleanup          // Cleanup
163          unload_menu(&bbs_menu);          unload_menu(&bbs_menu);
164    


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

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