aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_cycle.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-04-20 06:08:47 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-04-20 06:08:47 +0000
commitbd91999ea577266b0d899ea206cdaa8d19f486b2 (patch)
tree6936e209210662a34db4f9b9c63d03b95e7d9956 /src/core/ngx_cycle.c
parentb533e9825295a0855d78912dae9d8f1180df0900 (diff)
downloadnginx-bd91999ea577266b0d899ea206cdaa8d19f486b2.tar.gz
nginx-bd91999ea577266b0d899ea206cdaa8d19f486b2.zip
Win32 master/workers model
Diffstat (limited to 'src/core/ngx_cycle.c')
-rw-r--r--src/core/ngx_cycle.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c
index d4186d358..2d829dd04 100644
--- a/src/core/ngx_cycle.c
+++ b/src/core/ngx_cycle.c
@@ -295,8 +295,6 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
-#if !(NGX_WIN32)
-
if (ngx_test_config) {
if (ngx_create_pidfile(&ccf->pid, log) != NGX_OK) {
@@ -325,8 +323,6 @@ ngx_init_cycle(ngx_cycle_t *old_cycle)
}
}
-#endif
-
if (ngx_test_lockfile(cycle->lock_file.data, log) != NGX_OK) {
goto failed;
@@ -928,8 +924,6 @@ ngx_init_zone_pool(ngx_cycle_t *cycle, ngx_shm_zone_t *zn)
}
-#if !(NGX_WIN32)
-
ngx_int_t
ngx_create_pidfile(ngx_str_t *name, ngx_log_t *log)
{
@@ -938,6 +932,10 @@ ngx_create_pidfile(ngx_str_t *name, ngx_log_t *log)
ngx_file_t file;
u_char pid[NGX_INT64_LEN + 2];
+ if (ngx_process > NGX_PROCESS_MASTER) {
+ return NGX_OK;
+ }
+
ngx_memzero(&file, sizeof(ngx_file_t));
file.name = *name;
@@ -987,8 +985,6 @@ ngx_delete_pidfile(ngx_cycle_t *cycle)
}
}
-#endif
-
static ngx_int_t
ngx_test_lockfile(u_char *file, ngx_log_t *log)