21 |
|
* |
22 |
|
* $Id$ |
23 |
|
*/ |
24 |
+ |
|
25 |
|
#include "stdinc.h" |
26 |
|
#include "fdlist.h" |
27 |
|
#include "client.h" /* struct Client */ |
27 |
– |
#include "common.h" |
28 |
|
#include "event.h" |
29 |
|
#include "ircd.h" /* GlobalSetOptions */ |
30 |
|
#include "irc_string.h" |
31 |
– |
#include "rlimits.h" |
31 |
|
#include "s_bsd.h" /* comm_setselect */ |
32 |
< |
#include "s_conf.h" /* ServerInfo */ |
32 |
> |
#include "conf.h" /* ServerInfo */ |
33 |
|
#include "send.h" |
34 |
|
#include "memory.h" |
35 |
|
#include "numeric.h" |
36 |
+ |
#include "s_misc.h" |
37 |
+ |
#include "irc_res.h" |
38 |
|
|
39 |
|
fde_t *fd_hash[FD_HASH_SIZE]; |
40 |
|
fde_t *fd_next_in_loop = NULL; |
78 |
|
int fdmax; |
79 |
|
struct rlimit limit; |
80 |
|
|
81 |
< |
if (!getrlimit(RLIMIT_FD_MAX, &limit)) |
81 |
> |
if (!getrlimit(RLIMIT_NOFILE, &limit)) |
82 |
|
{ |
83 |
|
limit.rlim_cur = limit.rlim_max; |
84 |
< |
setrlimit(RLIMIT_FD_MAX, &limit); |
84 |
> |
setrlimit(RLIMIT_NOFILE, &limit); |
85 |
|
} |
86 |
|
|
87 |
|
fdmax = getdtablesize(); |