--- lbbs/src/main.c 2025/05/05 11:11:06 1.22 +++ lbbs/src/main.c 2025/05/08 08:05:58 1.26 @@ -1,16 +1,15 @@ /*************************************************************************** main.c - description ------------------- - begin : Mon Oct 11 2004 - copyright : (C) 2004 by Leaflet - email : leaflet@leafok.com + Copyright : (C) 2004-2025 by Leaflet + Email : leaflet@leafok.com ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * + * the Free Software Foundation; either version 3 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ @@ -140,12 +139,17 @@ int main(int argc, char *argv[]) } // Load configuration - if (load_conf("conf/bbsd.conf") < 0) + if (load_conf(CONF_BBSD) < 0) + { exit(-2); + } // Load menus - if (load_menu(&bbs_menu, "conf/menu.conf") < 0) + if (load_menu(&bbs_menu, CONF_MENU) < 0) + { + unload_menu(&bbs_menu); exit(-3); + } // Set signal handler signal(SIGCHLD, child_exit); @@ -158,11 +162,14 @@ int main(int argc, char *argv[]) // 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); } // Cleanup unload_menu(&bbs_menu); + log_std("Main process exit normally\n"); + return 0; }