]> git.kaiwu.me - nginx.git/commitdiff
allow "env" to work in the single process mode
authorIgor Sysoev <igor@sysoev.ru>
Mon, 13 Dec 2010 10:55:15 +0000 (10:55 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 13 Dec 2010 10:55:15 +0000 (10:55 +0000)
src/os/unix/ngx_process_cycle.c

index 60510255895f0c93f2b0366e240b6f4ebf8b173c..3ff0f75c6a2f1446eee5ab7789c9cd08f014fdb6 100644 (file)
@@ -291,6 +291,11 @@ ngx_single_process_cycle(ngx_cycle_t *cycle)
 {
     ngx_uint_t  i;
 
+    if (ngx_set_environment(cycle, NULL) == NULL) {
+        /* fatal */
+        exit(2);
+    }
+
     for (i = 0; ngx_modules[i]; i++) {
         if (ngx_modules[i]->init_process) {
             if (ngx_modules[i]->init_process(cycle) == NGX_ERROR) {