| 21 |
#include "menu.h" |
#include "menu.h" |
| 22 |
#include <signal.h> |
#include <signal.h> |
| 23 |
#include <string.h> |
#include <string.h> |
| 24 |
|
#include <sys/types.h> |
| 25 |
#include <unistd.h> |
#include <unistd.h> |
| 26 |
|
|
| 27 |
void |
void |
| 147 |
exit (-3); |
exit (-3); |
| 148 |
|
|
| 149 |
//Set signal handler |
//Set signal handler |
| 150 |
|
signal (SIGCHLD, child_exit); |
| 151 |
|
signal (SIGTERM, system_exit); |
| 152 |
signal (SIG_RELOAD_MENU, reload_bbs_menu); |
signal (SIG_RELOAD_MENU, reload_bbs_menu); |
| 153 |
|
|
| 154 |
//Initialize socket server |
//Initialize socket server |
| 155 |
net_server (BBS_address, BBS_port); |
net_server (BBS_address, BBS_port); |
| 156 |
|
|
| 157 |
|
//Wait for child process exit |
| 158 |
|
while (SYS_child_process_count > 0) |
| 159 |
|
{ |
| 160 |
|
log_std ("."); |
| 161 |
|
sleep(1); |
| 162 |
|
} |
| 163 |
|
|
| 164 |
return 0; |
return 0; |
| 165 |
} |
} |