comparison src/core/nginx.c @ 3199:b242aaf1dcfa

nginx did not close log file set by --error-log-path, the bug was introduced in r2744
author Igor Sysoev <igor@sysoev.ru>
date Fri, 09 Oct 2009 14:43:09 +0000
parents adc4fc0c3cc3
children 794613efbb71
comparison
equal deleted inserted replaced
3198:48bfb7dc981b 3199:b242aaf1dcfa
374 ngx_set_stderr_n " failed"); 374 ngx_set_stderr_n " failed");
375 return 1; 375 return 1;
376 } 376 }
377 } 377 }
378 378
379 if (log->file->fd != ngx_stderr) {
380 if (ngx_close_file(log->file->fd) == NGX_FILE_ERROR) {
381 ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
382 ngx_close_file_n " built-in log failed");
383 }
384 }
385
379 ngx_use_stderr = 0; 386 ngx_use_stderr = 0;
380 387
381 if (ngx_process == NGX_PROCESS_SINGLE) { 388 if (ngx_process == NGX_PROCESS_SINGLE) {
382 ngx_single_process_cycle(cycle); 389 ngx_single_process_cycle(cycle);
383 390