diff src/os/unix/ngx_process_cycle.c @ 278:704622b2528a NGINX_0_5_9

nginx 0.5.9 *) Change: now the ngx_http_memcached_module uses the $memcached_key variable value as a key. *) Feature: the $memcached_key variable. *) Feature: the "clean" parameter in the "client_body_in_file_only" directive. *) Feature: the "env" directive. *) Feature: the "sendfile" directive is available inside the "if" block. *) Feature: now on failure of the writing to access nginx logs a message to error_log, but not more often than once a minute. *) Bugfix: the "access_log off" directive did not always turn off the logging.
author Igor Sysoev <http://sysoev.ru>
date Thu, 25 Jan 2007 00:00:00 +0300
parents 6eb1e38f0f1f
children f745bf973510
line wrap: on
line diff
--- a/src/os/unix/ngx_process_cycle.c
+++ b/src/os/unix/ngx_process_cycle.c
@@ -757,15 +757,20 @@ ngx_worker_process_cycle(ngx_cycle_t *cy
 static void
 ngx_worker_process_init(ngx_cycle_t *cycle, ngx_uint_t priority)
 {
-    sigset_t           set;
-    ngx_int_t          n;
-    ngx_uint_t         i;
-    struct rlimit      rlmt;
-    ngx_core_conf_t   *ccf;
-    ngx_listening_t   *ls;
+    sigset_t          set;
+    ngx_int_t         n;
+    ngx_uint_t        i;
+    struct rlimit     rlmt;
+    ngx_core_conf_t  *ccf;
+    ngx_listening_t  *ls;
 
     ngx_process = NGX_PROCESS_WORKER;
 
+    if (ngx_set_environment(cycle, NULL) == NULL) {
+        /* fatal */
+        exit(2);
+    }
+
     ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
 
     if (geteuid() == 0) {