diff 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
line wrap: on
line diff
--- a/src/os/unix/ngx_process_cycle.c
+++ b/src/os/unix/ngx_process_cycle.c
@@ -607,6 +607,10 @@ static void ngx_master_exit(ngx_cycle_t 
 
 static void ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data)
 {
+    ngx_int_t          n;
+    ngx_err_t          err;
+    ngx_core_conf_t   *ccf;
+
     ngx_worker_process_init(cycle);
 
     ngx_setproctitle("worker process");
@@ -618,6 +622,8 @@ static void ngx_worker_process_cycle(ngx
         exit(2);
     }
 
+    ccf = (ngx_core_conf_t *) ngx_get_conf(cycle->conf_ctx, ngx_core_module);
+
     if (ngx_threads_n) {
         if (ngx_init_threads(ngx_threads_n,
                                    ccf->thread_stack_size, cycle) == NGX_ERROR)
@@ -914,10 +920,9 @@ static void ngx_wakeup_worker_threads(ng
 
         for (i = 0; i < ngx_threads_n; i++) {
             if (ngx_threads[i].state < NGX_THREAD_EXIT) {
-                ngx_cond_signal(ngx_threads[i].cv);
+                if (ngx_cond_signal(ngx_threads[i].cv) == NGX_ERROR) {
+                    ngx_threads[i].state = NGX_THREAD_DONE;
 
-                if (ngx_threads[i].cv->tid == (ngx_tid_t) -1) {
-                    ngx_threads[i].state = NGX_THREAD_DONE;
                 } else {
                     live = 1;
                 }
@@ -955,8 +960,6 @@ static void *ngx_worker_thread_cycle(voi
     ngx_core_tls_t   *tls;
     ngx_cycle_t      *cycle;
 
-    thr->cv->tid = ngx_thread_self();
-
     cycle = (ngx_cycle_t *) ngx_cycle;
 
     sigemptyset(&set);