aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_process_cycle.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-11-25 16:17:31 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-11-25 16:17:31 +0000
commitf69060481edeaca075669b50e34ca8ec821c2401 (patch)
tree6fa6907cc2fdfe0ac6bcdf7f63e76a7f8b41f33f /src/os/unix/ngx_process_cycle.c
parent865a7de474a13c5f1202f97fac31565f33a5e1a1 (diff)
downloadnginx-f69060481edeaca075669b50e34ca8ec821c2401.tar.gz
nginx-f69060481edeaca075669b50e34ca8ec821c2401.zip
nginx-0.1.9-RELEASE importrelease-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; the bug had appeared in 0.1.8.
Diffstat (limited to 'src/os/unix/ngx_process_cycle.c')
-rw-r--r--src/os/unix/ngx_process_cycle.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c
index 37b2ef193..3d1c51bc0 100644
--- 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 *cycle)
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_cycle_t *cycle, void *data)
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(ngx_cycle_t *cycle)
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_threads[i].cv->tid == (ngx_tid_t) -1) {
+ if (ngx_cond_signal(ngx_threads[i].cv) == NGX_ERROR) {
ngx_threads[i].state = NGX_THREAD_DONE;
+
} else {
live = 1;
}
@@ -955,8 +960,6 @@ static void *ngx_worker_thread_cycle(void *data)
ngx_core_tls_t *tls;
ngx_cycle_t *cycle;
- thr->cv->tid = ngx_thread_self();
-
cycle = (ngx_cycle_t *) ngx_cycle;
sigemptyset(&set);