diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-10-03 20:02:06 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-10-03 20:02:06 +0000 |
commit | aad1b89b68b0651b5729b15203081f6b4620847a (patch) | |
tree | 8a5906c3607c082e27d4d8ebc1e9a9e5b42822b5 /src/os/unix/ngx_posix_init.c | |
parent | 8035fd27919d1f598b0d655a3bf30200220462d3 (diff) | |
download | nginx-aad1b89b68b0651b5729b15203081f6b4620847a.tar.gz nginx-aad1b89b68b0651b5729b15203081f6b4620847a.zip |
nginx-0.1.0-2004-10-04-00:02:06 import
Diffstat (limited to 'src/os/unix/ngx_posix_init.c')
-rw-r--r-- | src/os/unix/ngx_posix_init.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/os/unix/ngx_posix_init.c b/src/os/unix/ngx_posix_init.c index f750495bf..134c27691 100644 --- a/src/os/unix/ngx_posix_init.c +++ b/src/os/unix/ngx_posix_init.c @@ -8,9 +8,12 @@ #include <ngx_core.h> -int ngx_ncpu; -int ngx_max_sockets; -int ngx_inherited_nonblocking; +ngx_int_t ngx_ncpu; +ngx_int_t ngx_max_sockets; +ngx_int_t ngx_inherited_nonblocking; + + +struct rlimit rlmt; #if (NGX_POSIX_IO) @@ -82,10 +85,9 @@ ngx_signal_t signals[] = { }; -int ngx_posix_init(ngx_log_t *log) +ngx_int_t ngx_posix_init(ngx_log_t *log) { ngx_signal_t *sig; - struct rlimit rlmt; struct sigaction sa; ngx_pagesize = getpagesize(); @@ -111,10 +113,6 @@ int ngx_posix_init(ngx_log_t *log) return NGX_ERROR; } - ngx_log_error(NGX_LOG_INFO, log, 0, - "getrlimit(RLIMIT_NOFILE): " RLIM_T_FMT ":" RLIM_T_FMT, - rlmt.rlim_cur, rlmt.rlim_max); - ngx_max_sockets = rlmt.rlim_cur; #if (HAVE_INHERITED_NONBLOCK) @@ -127,6 +125,14 @@ int ngx_posix_init(ngx_log_t *log) } +void ngx_posix_status(ngx_log_t *log) +{ + ngx_log_error(NGX_LOG_INFO, log, 0, + "getrlimit(RLIMIT_NOFILE): " RLIM_T_FMT ":" RLIM_T_FMT, + rlmt.rlim_cur, rlmt.rlim_max); +} + + void ngx_signal_handler(int signo) { char *action; |