Mercurial > hg > nginx
comparison src/os/unix/ngx_init.c @ 86:3973260705cc
nginx-0.0.1-2003-05-12-19:52:24 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 12 May 2003 15:52:24 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
85:3549c2bf9eaf | 86:3973260705cc |
---|---|
1 | |
2 | |
3 int ngx_unix_init(ngx_log_t *log) | |
4 { | |
5 struct rlimit rlmt; | |
6 | |
7 if (getrlimit(RLIMIT_NOFILE, &rlmt) == -1) { | |
8 ngx_log_error(NGX_LOG_ALERT, log, errno, | |
9 "getrlimit(RLIMIT_NOFILE) failed)"); | |
10 return NGX_ERROR; | |
11 } | |
12 | |
13 ngx_log_error(NGX_LOG_INFO, log, 0, | |
14 "getrlimit(RLIMIT_NOFILE): %d", rlmt.rlim_cur); | |
15 | |
16 RLIM_INFINITY | |
17 max_connections =< rlmt.rlim_cur; | |
18 | |
19 return NGX_OK; | |
20 } |