blob: 28af1288db19da69fe763f9e2d8bbe8bc62147f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
int ngx_unix_init(ngx_log_t *log)
{
struct rlimit rlmt;
if (getrlimit(RLIMIT_NOFILE, &rlmt) == -1) {
ngx_log_error(NGX_LOG_ALERT, log, errno,
"getrlimit(RLIMIT_NOFILE) failed)");
return NGX_ERROR;
}
ngx_log_error(NGX_LOG_INFO, log, 0,
"getrlimit(RLIMIT_NOFILE): %d", rlmt.rlim_cur);
RLIM_INFINITY
max_connections =< rlmt.rlim_cur;
return NGX_OK;
}
|