summaryrefslogtreecommitdiffhomepage
path: root/src/core/ngx_cycle.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2012-11-12 18:39:51 +0000
committerMaxim Dounin <mdounin@mdounin.ru>2012-11-12 18:39:51 +0000
commit033598bc073da23dcec5e4ea80b85cccecd8958a (patch)
treeb5c907bbebaefe9915049d45aef7610d03157527 /src/core/ngx_cycle.c
parentd39777712d97180ff439461813083cbc7892a2a1 (diff)
downloadnginx-033598bc073da23dcec5e4ea80b85cccecd8958a.tar.gz
nginx-033598bc073da23dcec5e4ea80b85cccecd8958a.tar.bz2
Merge of r4870, r4871, r4890, r4895: minor fixes.
*) Made sure to initialize the entire ngx_file_t structure. Found by Coverity. *) Correct plural form for "path" in the whole source base. *) Removed conditional compilation from waitpid() error test. There are reports that call to a signal handler for an exited process despite waitpid() already called for the process may happen on Linux as well. *) Style, parentheses instead of braces in misc/GNUMakefile.
Diffstat (limited to 'src/core/ngx_cycle.c')
-rw-r--r--src/core/ngx_cycle.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c
index e5468ae9b..f15372990 100644
--- a/src/core/ngx_cycle.c
+++ b/src/core/ngx_cycle.c
@@ -118,18 +118,18 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
}
- n = old_cycle->pathes.nelts ? old_cycle->pathes.nelts : 10;
+ n = old_cycle->paths.nelts ? old_cycle->paths.nelts : 10;
- cycle->pathes.elts = ngx_pcalloc(pool, n * sizeof(ngx_path_t *));
- if (cycle->pathes.elts == NULL) {
+ cycle->paths.elts = ngx_pcalloc(pool, n * sizeof(ngx_path_t *));
+ if (cycle->paths.elts == NULL) {
ngx_destroy_pool(pool);
return NULL;
}
- cycle->pathes.nelts = 0;
- cycle->pathes.size = sizeof(ngx_path_t *);
- cycle->pathes.nalloc = n;
- cycle->pathes.pool = pool;
+ cycle->paths.nelts = 0;
+ cycle->paths.size = sizeof(ngx_path_t *);
+ cycle->paths.nalloc = n;
+ cycle->paths.pool = pool;
if (old_cycle->open_files.part.nelts) {
@@ -334,7 +334,7 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
}
- if (ngx_create_pathes(cycle, ccf->user) != NGX_OK) {
+ if (ngx_create_paths(cycle, ccf->user) != NGX_OK) {
goto failed;
}
@@ -1038,6 +1038,8 @@ ngx_signal_process(ngx_cycle_t *cycle, char *sig)
ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
+ ngx_memzero(&file, sizeof(ngx_file_t));
+
file.name = ccf->pid;
file.log = cycle->log;