| 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 */ |
| 33 |
|
#include "send.h" |
| 76 |
|
int fdmax; |
| 77 |
|
struct rlimit limit; |
| 78 |
|
|
| 79 |
< |
if (!getrlimit(RLIMIT_FD_MAX, &limit)) |
| 79 |
> |
if (!getrlimit(RLIMIT_NOFILE, &limit)) |
| 80 |
|
{ |
| 81 |
|
limit.rlim_cur = limit.rlim_max; |
| 82 |
< |
setrlimit(RLIMIT_FD_MAX, &limit); |
| 82 |
> |
setrlimit(RLIMIT_NOFILE, &limit); |
| 83 |
|
} |
| 84 |
|
|
| 85 |
|
fdmax = getdtablesize(); |