Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
7743:4b1299b1856a | 7744:f18db38a9826 |
---|---|
94 if (cycle->prefix.data == NULL) { | 94 if (cycle->prefix.data == NULL) { |
95 ngx_destroy_pool(pool); | 95 ngx_destroy_pool(pool); |
96 return NULL; | 96 return NULL; |
97 } | 97 } |
98 | 98 |
99 cycle->error_log.len = old_cycle->error_log.len; | |
100 cycle->error_log.data = ngx_pnalloc(pool, old_cycle->error_log.len + 1); | |
101 if (cycle->error_log.data == NULL) { | |
102 ngx_destroy_pool(pool); | |
103 return NULL; | |
104 } | |
105 ngx_cpystrn(cycle->error_log.data, old_cycle->error_log.data, | |
106 old_cycle->error_log.len + 1); | |
107 | |
99 cycle->conf_file.len = old_cycle->conf_file.len; | 108 cycle->conf_file.len = old_cycle->conf_file.len; |
100 cycle->conf_file.data = ngx_pnalloc(pool, old_cycle->conf_file.len + 1); | 109 cycle->conf_file.data = ngx_pnalloc(pool, old_cycle->conf_file.len + 1); |
101 if (cycle->conf_file.data == NULL) { | 110 if (cycle->conf_file.data == NULL) { |
102 ngx_destroy_pool(pool); | 111 ngx_destroy_pool(pool); |
103 return NULL; | 112 return NULL; |