--- lbbs/src/net_server.c 2025/05/15 06:24:11 1.34 +++ lbbs/src/net_server.c 2025/05/16 14:09:31 1.35 @@ -24,6 +24,7 @@ #include "io.h" #include "fork.h" #include "menu.h" +#include "file_loader.h" #include #include #include @@ -193,6 +194,21 @@ int net_server(const char *hostaddr, in_ } } + if (SYS_data_file_reload && !SYS_server_exit) + { + SYS_data_file_reload = 0; + + for (int i = 0; i < data_files_load_startup_count; i++) + { + if (load_file_mmap(data_files_load_startup[i]) < 0) + { + log_error("load_file_mmap(%s) error\n", data_files_load_startup[i]); + } + } + + log_std("Reload data files successfully\n"); + } + nfds = epoll_wait(epollfd, events, MAX_EVENTS, 100); // 0.1 second if (nfds < 0)