move ngx_strerror_init() at the very start

This commit is contained in:
Igor Sysoev 2010-11-29 15:00:02 +00:00
parent 8c6144f022
commit a979d9fb30

View File

@ -203,6 +203,10 @@ main(int argc, char *const *argv)
ngx_cycle_t *cycle, init_cycle;
ngx_core_conf_t *ccf;
if (ngx_strerror_init() != NGX_OK) {
return 1;
}
if (ngx_get_options(argc, argv) != NGX_OK) {
return 1;
}
@ -270,10 +274,6 @@ main(int argc, char *const *argv)
ngx_pid = ngx_getpid();
if (ngx_strerror_init() != NGX_OK) {
return 1;
}
log = ngx_log_init(ngx_prefix);
if (log == NULL) {
return 1;