comparison src/os/unix/ngx_process_cycle.c @ 18:6f8b0dc0f8dd NGINX_0_1_9

nginx 0.1.9 *) Bugfix: the proxied request was sent without arguments if the request contains "//", "/./", "/../" or "%XX". *) Bugfix: the large compressed responses may be transferred not completely. *) Bugfix: the files bigger than 2G was not transferred on Linux that does not support sendfile64(). *) Bugfix: while the build configuration on Linux the --with-poll_module parameter was required; bug appeared in 0.1.8.
author Igor Sysoev <http://sysoev.ru>
date Thu, 25 Nov 2004 00:00:00 +0300
parents 74b1868dd3cd
children 8b6db3bda591
comparison
equal deleted inserted replaced
17:9acb68bb0698 18:6f8b0dc0f8dd
605 } 605 }
606 606
607 607
608 static void ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data) 608 static void ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data)
609 { 609 {
610 ngx_int_t n;
611 ngx_err_t err;
612 ngx_core_conf_t *ccf;
613
610 ngx_worker_process_init(cycle); 614 ngx_worker_process_init(cycle);
611 615
612 ngx_setproctitle("worker process"); 616 ngx_setproctitle("worker process");
613 617
614 #if (NGX_THREADS) 618 #if (NGX_THREADS)
615 619
616 if (ngx_time_mutex_init(cycle->log) == NGX_ERROR) { 620 if (ngx_time_mutex_init(cycle->log) == NGX_ERROR) {
617 /* fatal */ 621 /* fatal */
618 exit(2); 622 exit(2);
619 } 623 }
624
625 ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
620 626
621 if (ngx_threads_n) { 627 if (ngx_threads_n) {
622 if (ngx_init_threads(ngx_threads_n, 628 if (ngx_init_threads(ngx_threads_n,
623 ccf->thread_stack_size, cycle) == NGX_ERROR) 629 ccf->thread_stack_size, cycle) == NGX_ERROR)
624 { 630 {
912 918
913 live = 0; 919 live = 0;
914 920
915 for (i = 0; i < ngx_threads_n; i++) { 921 for (i = 0; i < ngx_threads_n; i++) {
916 if (ngx_threads[i].state < NGX_THREAD_EXIT) { 922 if (ngx_threads[i].state < NGX_THREAD_EXIT) {
917 ngx_cond_signal(ngx_threads[i].cv); 923 if (ngx_cond_signal(ngx_threads[i].cv) == NGX_ERROR) {
918
919 if (ngx_threads[i].cv->tid == (ngx_tid_t) -1) {
920 ngx_threads[i].state = NGX_THREAD_DONE; 924 ngx_threads[i].state = NGX_THREAD_DONE;
925
921 } else { 926 } else {
922 live = 1; 927 live = 1;
923 } 928 }
924 } 929 }
925 930
952 957
953 sigset_t set; 958 sigset_t set;
954 ngx_err_t err; 959 ngx_err_t err;
955 ngx_core_tls_t *tls; 960 ngx_core_tls_t *tls;
956 ngx_cycle_t *cycle; 961 ngx_cycle_t *cycle;
957
958 thr->cv->tid = ngx_thread_self();
959 962
960 cycle = (ngx_cycle_t *) ngx_cycle; 963 cycle = (ngx_cycle_t *) ngx_cycle;
961 964
962 sigemptyset(&set); 965 sigemptyset(&set);
963 sigaddset(&set, ngx_signal_value(NGX_RECONFIGURE_SIGNAL)); 966 sigaddset(&set, ngx_signal_value(NGX_RECONFIGURE_SIGNAL));