| 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 |
| 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 |
| 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 |
{ |
{ |