# HG changeset patch # User Igor Sysoev # Date 1284564261 0 # Node ID 89002ac695e5fb8c87d0085f3a8c324a561bae20 # Parent 0a84dc5f56134d59ed0c467b821aaaceb0a897ad worker_rlimit_core should be off_t diff -r 0a84dc5f5613 -r 89002ac695e5 src/core/nginx.c --- a/src/core/nginx.c Mon Sep 13 12:44:43 2010 +0000 +++ b/src/core/nginx.c Wed Sep 15 15:24:21 2010 +0000 @@ -110,7 +110,7 @@ { ngx_string("worker_rlimit_core"), NGX_MAIN_CONF|NGX_DIRECT_CONF|NGX_CONF_TAKE1, - ngx_conf_set_size_slot, + ngx_conf_set_off_slot, 0, offsetof(ngx_core_conf_t, rlimit_core), NULL }, @@ -941,7 +941,7 @@ ccf->debug_points = NGX_CONF_UNSET; ccf->rlimit_nofile = NGX_CONF_UNSET; - ccf->rlimit_core = NGX_CONF_UNSET_SIZE; + ccf->rlimit_core = NGX_CONF_UNSET; ccf->rlimit_sigpending = NGX_CONF_UNSET; ccf->user = (ngx_uid_t) NGX_CONF_UNSET_UINT; diff -r 0a84dc5f5613 -r 89002ac695e5 src/core/ngx_cycle.h --- a/src/core/ngx_cycle.h Mon Sep 13 12:44:43 2010 +0000 +++ b/src/core/ngx_cycle.h Wed Sep 15 15:24:21 2010 +0000 @@ -78,7 +78,7 @@ ngx_int_t rlimit_nofile; ngx_int_t rlimit_sigpending; - size_t rlimit_core; + off_t rlimit_core; int priority; diff -r 0a84dc5f5613 -r 89002ac695e5 src/os/unix/ngx_process_cycle.c --- a/src/os/unix/ngx_process_cycle.c Mon Sep 13 12:44:43 2010 +0000 +++ b/src/os/unix/ngx_process_cycle.c Wed Sep 15 15:24:21 2010 +0000 @@ -856,13 +856,13 @@ } } - if (ccf->rlimit_core != NGX_CONF_UNSET_SIZE) { + if (ccf->rlimit_core != NGX_CONF_UNSET) { rlmt.rlim_cur = (rlim_t) ccf->rlimit_core; rlmt.rlim_max = (rlim_t) ccf->rlimit_core; if (setrlimit(RLIMIT_CORE, &rlmt) == -1) { ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, - "setrlimit(RLIMIT_CORE, %i) failed", + "setrlimit(RLIMIT_CORE, %O) failed", ccf->rlimit_core); } }