/[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.23 by sysadm, Tue May 6 05:31:26 2025 UTC Revision 1.26 by sysadm, Thu May 8 08:05:58 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(SIGCHLD, child_exit);
# Line 157  int main(int argc, char *argv[]) Line 162  int main(int argc, char *argv[])
162          // Wait for child process exit          // Wait for child process exit
163          while (SYS_child_process_count > 0)          while (SYS_child_process_count > 0)
164          {          {
165                    log_std("Waiting for %d child process to exit\n", SYS_child_process_count);
166                  sleep(1);                  sleep(1);
167          }          }
168    
169          // Cleanup          // Cleanup
170          unload_menu(&bbs_menu);          unload_menu(&bbs_menu);
171    
172            log_std("Main process exit normally\n");
173            
174          return 0;          return 0;
175  }  }


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

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