]> git.kaiwu.me - nginx.git/commitdiff
worker_rlimit_core should be off_t
authorIgor Sysoev <igor@sysoev.ru>
Wed, 15 Sep 2010 15:24:21 +0000 (15:24 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Wed, 15 Sep 2010 15:24:21 +0000 (15:24 +0000)
src/core/nginx.c
src/core/ngx_cycle.h
src/os/unix/ngx_process_cycle.c

index 62cea755733837b5ce46cac3623c402459244ace..0f19371e632f6d1b382dedf7547570ad25db2acd 100644 (file)
@@ -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;
index 3f2e2229c0f0f12bd24e626648ab0d409be3cebe..d96c85ffa35e8591a323043b2473c1bf538cda34 100644 (file)
@@ -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;
 
index 82d322dfc6ad85c7d3b08a7c300bc0c46d8dd9e6..60510255895f0c93f2b0366e240b6f4ebf8b173c 100644 (file)
@@ -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);
         }
     }