comparison src/os/unix/ngx_process_cycle.c @ 345:fade4edd61f8

nginx-0.0.3-2004-06-04-18:57:33 import
author Igor Sysoev <igor@sysoev.ru>
date Fri, 04 Jun 2004 14:57:33 +0000
parents 9a0ffa21f193
children eaf1f651cf86
comparison
equal deleted inserted replaced
344:e366ba5db8f8 345:fade4edd61f8
512 for ( ;; ) { 512 for ( ;; ) {
513 if (ngx_exiting 513 if (ngx_exiting
514 && ngx_event_timer_rbtree == &ngx_event_timer_sentinel) 514 && ngx_event_timer_rbtree == &ngx_event_timer_sentinel)
515 { 515 {
516 ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "exiting"); 516 ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "exiting");
517 ngx_destroy_pool(cycle->pool); 517 /*
518 * we do not destroy cycle->pool here because a signal handler
519 * that uses cycle->log can be called at this point
520 */
518 exit(0); 521 exit(0);
519 } 522 }
520 523
521 ngx_log_debug0(NGX_LOG_DEBUG_EVENT, cycle->log, 0, "worker cycle"); 524 ngx_log_debug0(NGX_LOG_DEBUG_EVENT, cycle->log, 0, "worker cycle");
522 525
523 ngx_process_events(cycle); 526 ngx_process_events(cycle);
524 527
525 if (ngx_terminate) { 528 if (ngx_terminate) {
526 ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "exiting"); 529 ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "exiting");
527 ngx_destroy_pool(cycle->pool); 530 /*
531 * we do not destroy cycle->pool here because a signal handler
532 * that uses cycle->log can be called at this point
533 */
528 exit(0); 534 exit(0);
529 } 535 }
530 536
531 if (ngx_quit) { 537 if (ngx_quit) {
532 ngx_quit = 0; 538 ngx_quit = 0;