diff options
author | Igor Sysoev <igor@sysoev.ru> | 2007-01-25 22:09:46 +0000 |
---|---|---|
committer | Jonathan Kolb <jon@b0g.us> | 2007-01-25 22:09:46 +0000 |
commit | 4335a0aa2cb4b58f9b0e79b62f5bf19d37a595a9 (patch) | |
tree | 82390c7e5b9c69189ad4512af1fbf3b0eb81a4b9 | |
parent | 5013844e68510c590c94e43c766f65054cb0d200 (diff) | |
download | nginx-4335a0aa2cb4b58f9b0e79b62f5bf19d37a595a9.tar.gz |
Changes with nginx 0.5.10 26 Jan 2007v0.5.10
*) Bugfix: while online executable file upgrade the new master process
did not inherit the listening sockets; bug appeared in 0.5.9.
*) Bugfix: a segmentation fault might occur in worker process if nginx
was built with -O2 optimization; bug appeared in 0.5.1.
-rw-r--r-- | CHANGES | 9 | ||||
-rw-r--r-- | CHANGES.ru | 9 | ||||
-rw-r--r-- | src/core/nginx.c | 15 | ||||
-rw-r--r-- | src/core/nginx.h | 2 | ||||
-rw-r--r-- | src/core/ngx_times.c | 6 | ||||
-rw-r--r-- | src/http/modules/perl/nginx.pm | 2 |
6 files changed, 28 insertions, 15 deletions
@@ -1,4 +1,13 @@ +Changes with nginx 0.5.10 26 Jan 2007 + + *) Bugfix: while online executable file upgrade the new master process + did not inherit the listening sockets; bug appeared in 0.5.9. + + *) Bugfix: a segmentation fault might occur in worker process if nginx + was built with -O2 optimization; bug appeared in 0.5.1. + + Changes with nginx 0.5.9 25 Jan 2007 *) Change: now the ngx_http_memcached_module uses the $memcached_key diff --git a/CHANGES.ru b/CHANGES.ru index 49c6dc0eb..043e26fc3 100644 --- a/CHANGES.ru +++ b/CHANGES.ru @@ -1,4 +1,13 @@ +Изменения в nginx 0.5.10 26.01.2007 + + *) Исправление: во время обновления исполняемого файла новый процесс не + наследовал слушающие сокеты; ошибка появилась в 0.5.9. + + *) Исправление: при сборке с оптимизацией -O2 в рабочем процессе мог + произойти segmentation fault; ошибка появилась в 0.5.1. + + Изменения в nginx 0.5.9 25.01.2007 *) Изменение: модуль ngx_http_memcached_module теперь в качестве ключа diff --git a/src/core/nginx.c b/src/core/nginx.c index c251ff56a..357b1b9cd 100644 --- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -423,15 +423,8 @@ ngx_set_environment(ngx_cycle_t *cycle, ngx_uint_t *last) ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module); - if (last) { - n = *last; - - } else { - if (ccf->environment) { - return ccf->environment; - } - - n = 0; + if (last == NULL && ccf->environment) { + return ccf->environment; } var = ccf->env.elts; @@ -453,6 +446,8 @@ ngx_set_environment(ngx_cycle_t *cycle, ngx_uint_t *last) tz_found: + n = 0; + for (i = 0; i < ccf->env.nelts; i++) { if (var[i].data[var[i].len] == '=') { @@ -472,8 +467,8 @@ tz_found: } if (last) { + env = ngx_alloc((*last + n + 1) * sizeof(char *), cycle->log); *last = n; - env = ngx_alloc((n + 1) * sizeof(char *), cycle->log); } else { env = ngx_palloc(cycle->pool, (n + 1) * sizeof(char *)); diff --git a/src/core/nginx.h b/src/core/nginx.h index 89e1c9409..3386f5879 100644 --- a/src/core/nginx.h +++ b/src/core/nginx.h @@ -8,7 +8,7 @@ #define _NGINX_H_INCLUDED_ -#define NGINX_VERSION "0.5.9" +#define NGINX_VERSION "0.5.10" #define NGINX_VER "nginx/" NGINX_VERSION #define NGINX_VAR "NGINX" diff --git a/src/core/ngx_times.c b/src/core/ngx_times.c index 571e4e7f0..be289dd14 100644 --- a/src/core/ngx_times.c +++ b/src/core/ngx_times.c @@ -101,7 +101,7 @@ ngx_time_update(time_t sec, ngx_uint_t msec) ngx_gmtime(sec, &gmt); - p0 = cached_http_time[slot]; + p0 = &cached_http_time[slot][0]; (void) ngx_sprintf(p0, "%s, %02d %s %4d %02d:%02d:%02d GMT", week[gmt.ngx_tm_wday], gmt.ngx_tm_mday, @@ -126,7 +126,7 @@ ngx_time_update(time_t sec, ngx_uint_t msec) #endif - p1 = cached_err_log_time[slot]; + p1 = &cached_err_log_time[slot][0]; (void) ngx_sprintf(p1, "%4d/%02d/%02d %02d:%02d:%02d", tm.ngx_tm_year, tm.ngx_tm_mon, @@ -134,7 +134,7 @@ ngx_time_update(time_t sec, ngx_uint_t msec) tm.ngx_tm_min, tm.ngx_tm_sec); - p2 = cached_http_log_time[slot]; + p2 = &cached_http_log_time[slot][0]; (void) ngx_sprintf(p2, "%02d/%s/%d:%02d:%02d:%02d %c%02d%02d", tm.ngx_tm_mday, months[tm.ngx_tm_mon - 1], diff --git a/src/http/modules/perl/nginx.pm b/src/http/modules/perl/nginx.pm index 74703a29c..4ba6c2a4f 100644 --- a/src/http/modules/perl/nginx.pm +++ b/src/http/modules/perl/nginx.pm @@ -47,7 +47,7 @@ our @EXPORT = qw( HTTP_INSUFFICIENT_STORAGE ); -our $VERSION = '0.5.9'; +our $VERSION = '0.5.10'; require XSLoader; XSLoader::load('nginx', $VERSION); |