diff options
author | Igor Sysoev <igor@sysoev.ru> | 2010-09-15 19:24:21 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2010-09-15 19:24:21 +0400 |
commit | 8c70e67f7b1044c9dc5df598cdb48ec18aa0853f (patch) | |
tree | 0e244c2f570e6f469cdd41e55cefeb3ad58b26cc /src | |
parent | 9a62648f7bece8e192085330a6409db7e9580ffa (diff) |
worker_rlimit_core should be off_t
Diffstat (limited to 'src')
-rw-r--r-- | src/core/nginx.c | 4 | ||||
-rw-r--r-- | src/core/ngx_cycle.h | 2 | ||||
-rw-r--r-- | src/os/unix/ngx_process_cycle.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/core/nginx.c b/src/core/nginx.c index 62cea7557..0f19371e6 100644 --- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -110,7 +110,7 @@ static ngx_command_t ngx_core_commands[] = { { 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 @@ ngx_core_module_create_conf(ngx_cycle_t *cycle) 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 --git a/src/core/ngx_cycle.h b/src/core/ngx_cycle.h index 3f2e2229c..d96c85ffa 100644 --- a/src/core/ngx_cycle.h +++ b/src/core/ngx_cycle.h @@ -78,7 +78,7 @@ typedef struct { ngx_int_t rlimit_nofile; ngx_int_t rlimit_sigpending; - size_t rlimit_core; + off_t rlimit_core; int priority; diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c index 82d322dfc..605102558 100644 --- a/src/os/unix/ngx_process_cycle.c +++ b/src/os/unix/ngx_process_cycle.c @@ -856,13 +856,13 @@ ngx_worker_process_init(ngx_cycle_t *cycle, ngx_uint_t priority) } } - 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); } } |