summaryrefslogtreecommitdiffhomepage
path: root/src/core/ngx_cycle.c
diff options
context:
space:
mode:
authorRuslan Ermilov <ru@nginx.com>2015-04-14 19:01:25 +0300
committerRuslan Ermilov <ru@nginx.com>2015-04-14 19:01:25 +0300
commitcf31347ee84fdaa02f768e641d1a2f1352b6a56a (patch)
tree95fa2e6267ffddd5d3ace7bf8108964e7c68fed8 /src/core/ngx_cycle.c
parentb0b7b5a356c7dedf4a1867e94d8a36cbb6dc3da1 (diff)
downloadnginx-cf31347ee84fdaa02f768e641d1a2f1352b6a56a.tar.gz
nginx-cf31347ee84fdaa02f768e641d1a2f1352b6a56a.tar.bz2
Upstream: the "zone" directive.
Upstreams with the "zone" directive are kept in shared memory, with a consistent view of all worker processes.
Diffstat (limited to 'src/core/ngx_cycle.c')
-rw-r--r--src/core/ngx_cycle.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c
index 11e413f4e..4646978f7 100644
--- a/src/core/ngx_cycle.c
+++ b/src/core/ngx_cycle.c
@@ -441,7 +441,8 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
}
if (shm_zone[i].tag == oshm_zone[n].tag
- && shm_zone[i].shm.size == oshm_zone[n].shm.size)
+ && shm_zone[i].shm.size == oshm_zone[n].shm.size
+ && !shm_zone[i].noreuse)
{
shm_zone[i].shm.addr = oshm_zone[n].shm.addr;
@@ -1234,6 +1235,7 @@ ngx_shared_memory_add(ngx_conf_t *cf, ngx_str_t *name, size_t size, void *tag)
shm_zone->shm.exists = 0;
shm_zone->init = NULL;
shm_zone->tag = tag;
+ shm_zone->noreuse = 0;
return shm_zone;
}