Mercurial > hg > nginx
comparison src/os/unix/ngx_process_cycle.c @ 1704:e584e946e198
move condition declarations inside blocks where they are used
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 10 Dec 2007 12:09:51 +0000 |
parents | 81774dc3db28 |
children | 55a9d867e3c8 |
comparison
equal
deleted
inserted
replaced
1703:43747661804d | 1704:e584e946e198 |
---|---|
685 static void | 685 static void |
686 ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data) | 686 ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data) |
687 { | 687 { |
688 ngx_uint_t i; | 688 ngx_uint_t i; |
689 ngx_connection_t *c; | 689 ngx_connection_t *c; |
690 | |
691 ngx_worker_process_init(cycle, 1); | |
692 | |
693 ngx_setproctitle("worker process"); | |
694 | |
690 #if (NGX_THREADS) | 695 #if (NGX_THREADS) |
691 ngx_int_t n; | 696 { |
692 ngx_err_t err; | 697 ngx_int_t n; |
693 ngx_core_conf_t *ccf; | 698 ngx_err_t err; |
694 #endif | 699 ngx_core_conf_t *ccf; |
695 | |
696 ngx_worker_process_init(cycle, 1); | |
697 | |
698 ngx_setproctitle("worker process"); | |
699 | |
700 #if (NGX_THREADS) | |
701 | 700 |
702 ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module); | 701 ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module); |
703 | 702 |
704 if (ngx_threads_n) { | 703 if (ngx_threads_n) { |
705 if (ngx_init_threads(ngx_threads_n, ccf->thread_stack_size, cycle) | 704 if (ngx_init_threads(ngx_threads_n, ccf->thread_stack_size, cycle) |
734 /* fatal */ | 733 /* fatal */ |
735 exit(2); | 734 exit(2); |
736 } | 735 } |
737 } | 736 } |
738 } | 737 } |
739 | 738 } |
740 #endif | 739 #endif |
741 | 740 |
742 for ( ;; ) { | 741 for ( ;; ) { |
743 | 742 |
744 if (ngx_exiting) { | 743 if (ngx_exiting) { |