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

Diff of /lbbs/src/init.c

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

Revision 1.19 by sysadm, Tue May 13 07:30:10 2025 UTC Revision 1.21 by sysadm, Sun Jun 1 03:07:42 2025 UTC
# Line 34  int init_daemon(void) Line 34  int init_daemon(void)
34    
35          pid = fork();          pid = fork();
36    
37          if (pid != 0) // Parent or error          if (pid > 0) // Parent process
38          {          {
39                  return pid;                  _exit(0);
40            }
41            else if (pid < 0) // error
42            {
43                    _exit(pid);
44          }          }
45    
46          // Child process          // Child process
# Line 44  int init_daemon(void) Line 48  int init_daemon(void)
48    
49          pid = fork();          pid = fork();
50    
51          if (pid != 0) // Parent or error          if (pid > 0) // Parent process
52            {
53                    _exit(0);
54            }
55            else if (pid < 0) // error
56          {          {
57                  return pid;                  _exit(pid);
58          }          }
59    
60          // Child process          // Child process
# Line 100  int load_conf(const char *conf_file) Line 108  int load_conf(const char *conf_file)
108                  if (strcmp(c_name, "bbs_max_client") == 0)                  if (strcmp(c_name, "bbs_max_client") == 0)
109                  {                  {
110                          fscanf(fin, "%d", &BBS_max_client);                          fscanf(fin, "%d", &BBS_max_client);
111                            if (BBS_max_client > MAX_CLIENTS_LIMIT)
112                            {
113                                    log_error("Config BBS_max_client > limit (%d), reset it to limit\n", BBS_max_client);
114                                    BBS_max_client = MAX_CLIENTS_LIMIT;
115                            }
116                    }
117                    if (strcmp(c_name, "bbs_max_client_per_ip") == 0)
118                    {
119                            fscanf(fin, "%d", &BBS_max_client_per_ip);
120                  }                  }
121                  if (strcmp(c_name, "bbs_max_user") == 0)                  if (strcmp(c_name, "bbs_max_user") == 0)
122                  {                  {


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

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