From 3f85d9c48a5764419dcfd4a8903167ba6180c1aa Mon Sep 17 00:00:00 2001 From: nginx Date: Tue, 2 Apr 2013 12:44:13 +0000 Subject: Changes with nginx 1.2.8 02 Apr 2013 *) Bugfix: new sessions were not always stored if the "ssl_session_cache shared" directive was used and there was no free space in shared memory. Thanks to Piotr Sikora. *) Bugfix: responses might hang if subrequests were used and a DNS error happened during subrequest processing. Thanks to Lanshun Zhou. *) Bugfix: in the ngx_http_mp4_module. Thanks to Gernot Vormayr. *) Bugfix: in backend usage accounting. --- src/core/nginx.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/core/nginx.c') diff --git a/src/core/nginx.c b/src/core/nginx.c index d02f9111d..94df9bf74 100644 --- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -594,6 +594,10 @@ ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv) var = ngx_alloc(sizeof(NGINX_VAR) + cycle->listening.nelts * (NGX_INT32_LEN + 1) + 2, cycle->log); + if (var == NULL) { + ngx_free(env); + return NGX_INVALID_PID; + } p = ngx_cpymem(var, NGINX_VAR "=", sizeof(NGINX_VAR)); @@ -633,7 +637,7 @@ ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv) ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module); - if (ngx_rename_file(ccf->pid.data, ccf->oldpid.data) != NGX_OK) { + if (ngx_rename_file(ccf->pid.data, ccf->oldpid.data) == NGX_FILE_ERROR) { ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, ngx_rename_file_n " %s to %s failed " "before executing new binary process \"%s\"", @@ -648,7 +652,9 @@ ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv) pid = ngx_execute(cycle, &ctx); if (pid == NGX_INVALID_PID) { - if (ngx_rename_file(ccf->oldpid.data, ccf->pid.data) != NGX_OK) { + if (ngx_rename_file(ccf->oldpid.data, ccf->pid.data) + == NGX_FILE_ERROR) + { ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno, ngx_rename_file_n " %s back to %s failed after " "an attempt to execute new binary process \"%s\"", -- cgit v1.2.1