diff options
author | Igor Sysoev <igor@sysoev.ru> | 2010-12-13 13:55:15 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2010-12-13 13:55:15 +0300 |
commit | 2567c92ace7e29fe8b4d4933dbe294cee2583018 (patch) | |
tree | 774a45d498d3ad6d3c219919118ee71feef55843 /src/os/unix | |
parent | 5644c43caf8130d511758b8f9727c4fd4e0388d4 (diff) |
allow "env" to work in the single process mode
Diffstat (limited to 'src/os/unix')
-rw-r--r-- | src/os/unix/ngx_process_cycle.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c index 605102558..3ff0f75c6 100644 --- a/src/os/unix/ngx_process_cycle.c +++ b/src/os/unix/ngx_process_cycle.c @@ -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) { |