]> git.kaiwu.me - nginx.git/commitdiff
nginx-0.0.3-2004-06-04-18:57:33 import
authorIgor Sysoev <igor@sysoev.ru>
Fri, 4 Jun 2004 14:57:33 +0000 (14:57 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 4 Jun 2004 14:57:33 +0000 (14:57 +0000)
auto/cc
src/event/ngx_event.c
src/os/unix/ngx_process_cycle.c

diff --git a/auto/cc b/auto/cc
index 9cee8c1619313ecb9f6bb73c021d62c8796e5624..59cbfbfe6e351b026787b210dd58c89c4522c1c2 100644 (file)
--- a/auto/cc
+++ b/auto/cc
@@ -4,7 +4,8 @@ CFLAGS="$CFLAGS $CC_OPT"
 case $CC in
 
     *gcc*)
-         # gcc 2.7.2.3, 2.8.1, 2.95.4, 3.3.2, 3.3.3, 3.4
+         # gcc 2.7.2.3, 2.8.1, 2.95.4,
+         #     3.2.3, 3.3.2, 3.3.3, 3.3.4, 3.4
 
          # optimization
          #CFLAGS="$CFLAGS -O2 -fomit-frame-pointer"
@@ -89,7 +90,7 @@ case $CC in
 
 
     *icc)
-         # Intel C++ compiler 7.1
+         # Intel C++ compiler 7.1, 8.0
 
          # optimization
          CFLAGS="$CFLAGS -O"
@@ -241,7 +242,7 @@ case $CC in
 
 
     wcl386)
-         # Open Watcom C 1.0
+         # Open Watcom C 1.0, 1.2
 
          # optimization
 
index c2c7c892e7fd571ef2bef6f3ada01c6eca6aacc8..e9ec48ece5726ff3f31eda00cb3df68213b9092c 100644 (file)
@@ -223,7 +223,7 @@ static ngx_int_t ngx_event_process_init(ngx_cycle_t *cycle)
     if (ngx_accept_mutex_ptr && ccf->worker_processes > 1 && ecf->accept_mutex)
     {
         ngx_accept_mutex = ngx_accept_mutex_ptr;
-        ngx_accept_mutex_held = 1;
+        ngx_accept_mutex_held = 0;
         ngx_accept_mutex_delay = ecf->accept_mutex_delay;
     }
 
@@ -371,15 +371,13 @@ static ngx_int_t ngx_event_process_init(ngx_cycle_t *cycle)
 
         rev->event_handler = &ngx_event_accept;
 
-        if (ngx_event_flags & NGX_USE_SIGIO_EVENT) {
-
-            if (ngx_accept_mutex) {
-                ngx_accept_mutex_held = 0;
+        if (ngx_accept_mutex) {
+            continue;
+        }
 
-            } else {
-                if (ngx_add_conn(c) == NGX_ERROR) {
-                    return NGX_ERROR;
-                }
+        if (ngx_event_flags & NGX_USE_SIGIO_EVENT) {
+            if (ngx_add_conn(c) == NGX_ERROR) {
+                return NGX_ERROR;
             }
 
         } else {
index 2a45754550328561d5da1236143b4cc39c6dc9e3..21b28cf9faa806e6b95cb313df33f6e0a72b7839 100644 (file)
@@ -514,7 +514,10 @@ static void ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data)
             && ngx_event_timer_rbtree == &ngx_event_timer_sentinel)
         {
             ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "exiting");
-            ngx_destroy_pool(cycle->pool);
+            /*
+             * we do not destroy cycle->pool here because a signal handler
+             * that uses cycle->log can be called at this point
+             */
             exit(0);
         }
 
@@ -524,7 +527,10 @@ static void ngx_worker_process_cycle(ngx_cycle_t *cycle, void *data)
 
         if (ngx_terminate) {
             ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "exiting");
-            ngx_destroy_pool(cycle->pool);
+            /*
+             * we do not destroy cycle->pool here because a signal handler
+             * that uses cycle->log can be called at this point
+             */
             exit(0);
         }