Mercurial > hg > nginx
diff src/core/ngx_cycle.c @ 7744:f18db38a9826
Core: "-e" command line option.
When installing or running from a non-root user it is sometimes required to
override default, compiled in error log path. There was no way to do this
without rebuilding the binary (ticket #147).
This patch introduced "-e" command line option which allows one to override
compiled in error log path.
author | Igor Ippolitov <iippolitov@nginx.com> |
---|---|
date | Thu, 19 Nov 2020 16:59:00 +0000 |
parents | 4f30f75dbdf3 |
children | 6a3ee145d0b5 |
line wrap: on
line diff
--- a/src/core/ngx_cycle.c Tue Nov 10 17:13:20 2020 +0300 +++ b/src/core/ngx_cycle.c Thu Nov 19 16:59:00 2020 +0000 @@ -96,6 +96,15 @@ return NULL; } + cycle->error_log.len = old_cycle->error_log.len; + cycle->error_log.data = ngx_pnalloc(pool, old_cycle->error_log.len + 1); + if (cycle->error_log.data == NULL) { + ngx_destroy_pool(pool); + return NULL; + } + ngx_cpystrn(cycle->error_log.data, old_cycle->error_log.data, + old_cycle->error_log.len + 1); + cycle->conf_file.len = old_cycle->conf_file.len; cycle->conf_file.data = ngx_pnalloc(pool, old_cycle->conf_file.len + 1); if (cycle->conf_file.data == NULL) {