Win32 master/workers model
diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c
index d4186d3..2d829dd 100644
--- a/src/core/ngx_cycle.c
+++ b/src/core/ngx_cycle.c
@@ -295,8 +295,6 @@
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 @@
}
}
-#endif
-
if (ngx_test_lockfile(cycle->lock_file.data, log) != NGX_OK) {
goto failed;
@@ -928,8 +924,6 @@
}
-#if !(NGX_WIN32)
-
ngx_int_t
ngx_create_pidfile(ngx_str_t *name, ngx_log_t *log)
{
@@ -938,6 +932,10 @@
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 @@
}
}
-#endif
-
static ngx_int_t
ngx_test_lockfile(u_char *file, ngx_log_t *log)