summaryrefslogtreecommitdiff
path: root/src/core/nginx.c
diff options
context:
space:
mode:
authornginx <nginx@nginx.org>2013-04-02 12:44:13 +0000
committerJon Kolb <jon@b0g.us>2013-04-02 12:44:13 +0000
commit3f85d9c48a5764419dcfd4a8903167ba6180c1aa (patch)
treebea3d4fd9ead91cb7ecda912b83d860895a21557 /src/core/nginx.c
parent8c07e8f9375b3892e6b180d5b8e21a90bd2589bc (diff)
downloadnginx-1.2.8.tar.gz
Changes with nginx 1.2.8 02 Apr 2013v1.2.8
*) 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.
Diffstat (limited to 'src/core/nginx.c')
-rw-r--r--src/core/nginx.c10
1 files changed, 8 insertions, 2 deletions
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\"",