nginx-0.1.13-RELEASE import

    *) Feature: the server_names_hash and server_names_hash_threshold
       directives.

    *) Bugfix: the *.domain.tld names in the "server_name" directive did
       not work.

    *) Bugfix: the %request_length log parameter logged the incorrect
       length.
diff --git a/src/os/unix/ngx_aio_write_chain.c b/src/os/unix/ngx_aio_write_chain.c
index c1109dc..88b2474 100644
--- a/src/os/unix/ngx_aio_write_chain.c
+++ b/src/os/unix/ngx_aio_write_chain.c
@@ -22,8 +22,8 @@
 
     /* the maximum limit size is the maximum size_t value - the page size */
 
-    if (limit == 0 || limit > MAX_SIZE_T_VALUE - ngx_pagesize) {
-        limit = MAX_SIZE_T_VALUE - ngx_pagesize;
+    if (limit == 0 || limit > NGX_MAX_SIZE_T_VALUE - ngx_pagesize) {
+        limit = NGX_MAX_SIZE_T_VALUE - ngx_pagesize;
     }
 
     send = 0;
diff --git a/src/os/unix/ngx_freebsd_sendfile_chain.c b/src/os/unix/ngx_freebsd_sendfile_chain.c
index 187365c..521d050 100644
--- a/src/os/unix/ngx_freebsd_sendfile_chain.c
+++ b/src/os/unix/ngx_freebsd_sendfile_chain.c
@@ -68,8 +68,8 @@
 
     /* the maximum limit size is the maximum size_t value - the page size */
 
-    if (limit == 0 || limit > MAX_SIZE_T_VALUE - ngx_pagesize) {
-        limit = MAX_SIZE_T_VALUE - ngx_pagesize;
+    if (limit == 0 || limit > NGX_MAX_SIZE_T_VALUE - ngx_pagesize) {
+        limit = NGX_MAX_SIZE_T_VALUE - ngx_pagesize;
     }
 
     send = 0;
diff --git a/src/os/unix/ngx_linux_sendfile_chain.c b/src/os/unix/ngx_linux_sendfile_chain.c
index c09d036..99599e2 100644
--- a/src/os/unix/ngx_linux_sendfile_chain.c
+++ b/src/os/unix/ngx_linux_sendfile_chain.c
@@ -51,8 +51,8 @@
 
     /* the maximum limit size is the maximum size_t value - the page size */
 
-    if (limit == 0 || limit > MAX_SIZE_T_VALUE - ngx_pagesize) {
-        limit = MAX_SIZE_T_VALUE - ngx_pagesize;
+    if (limit == 0 || limit > NGX_MAX_SIZE_T_VALUE - ngx_pagesize) {
+        limit = NGX_MAX_SIZE_T_VALUE - ngx_pagesize;
     }
 
 
diff --git a/src/os/unix/ngx_posix_init.c b/src/os/unix/ngx_posix_init.c
index 626d821..abc7f81 100644
--- a/src/os/unix/ngx_posix_init.c
+++ b/src/os/unix/ngx_posix_init.c
@@ -192,7 +192,7 @@
 
         case ngx_signal_value(NGX_REOPEN_SIGNAL):
             ngx_reopen = 1;
-            action = ", reopen logs";
+            action = ", reopening logs";
             break;
 
         case ngx_signal_value(NGX_CHANGEBIN_SIGNAL):
@@ -236,6 +236,8 @@
     case NGX_PROCESS_WORKER:
         switch (signo) {
 
+        case ngx_signal_value(NGX_NOACCEPT_SIGNAL):
+            ngx_debug_quit = 1;
         case ngx_signal_value(NGX_SHUTDOWN_SIGNAL):
             ngx_quit = 1;
             action = ", shutting down";
@@ -249,11 +251,10 @@
 
         case ngx_signal_value(NGX_REOPEN_SIGNAL):
             ngx_reopen = 1;
-            action = ", reopen logs";
+            action = ", reopening logs";
             break;
 
         case ngx_signal_value(NGX_RECONFIGURE_SIGNAL):
-        case ngx_signal_value(NGX_NOACCEPT_SIGNAL):
         case ngx_signal_value(NGX_CHANGEBIN_SIGNAL):
         case SIGIO:
             action = ", ignoring";
@@ -263,7 +264,7 @@
         break;
     }
 
-    ngx_log_error(NGX_LOG_INFO, ngx_cycle->log, 0,
+    ngx_log_error(NGX_LOG_NOTICE, ngx_cycle->log, 0,
                   "signal %d (%s) received%s", signo, sig->signame, action);
 
     if (ignore) {
diff --git a/src/os/unix/ngx_process.c b/src/os/unix/ngx_process.c
index 3141e14..0825c5f 100644
--- a/src/os/unix/ngx_process.c
+++ b/src/os/unix/ngx_process.c
@@ -142,8 +142,7 @@
         break;
     }
 
-    ngx_log_debug2(NGX_LOG_DEBUG_CORE, cycle->log, 0,
-                   "spawn %s: %P", name, pid);
+    ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "start %s %P", name, pid);
 
     ngx_processes[s].pid = pid;
     ngx_processes[s].exited = 0;
@@ -216,6 +215,7 @@
     ngx_int_t        i;
     ngx_uint_t       one;
     struct timeval   tv;
+
     one = 0;
 
     for ( ;; ) {
@@ -287,7 +287,7 @@
                           WCOREDUMP(status) ? " (core dumped)" : "");
 
         } else {
-            ngx_log_error(NGX_LOG_INFO, ngx_cycle->log, 0,
+            ngx_log_error(NGX_LOG_NOTICE, ngx_cycle->log, 0,
                           "%s %P exited with code %d",
                           process, pid, WEXITSTATUS(status));
         }
diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c
index c3b9905..d1be6f4 100644
--- a/src/os/unix/ngx_process_cycle.c
+++ b/src/os/unix/ngx_process_cycle.c
@@ -35,6 +35,7 @@
 sig_atomic_t  ngx_sigio;
 sig_atomic_t  ngx_terminate;
 sig_atomic_t  ngx_quit;
+sig_atomic_t  ngx_debug_quit;
 ngx_uint_t    ngx_exiting;
 sig_atomic_t  ngx_reconfigure;
 sig_atomic_t  ngx_reopen;
@@ -194,8 +195,6 @@
             ngx_reconfigure = 0;
 
             if (ngx_new_binary) {
-                ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "start new workers");
-
                 ngx_start_worker_processes(cycle, ccf->worker_processes,
                                            NGX_PROCESS_RESPAWN);
                 ngx_start_garbage_collector(cycle, NGX_PROCESS_RESPAWN);
@@ -204,7 +203,7 @@
                 continue;
             }
 
-            ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "reconfiguring");
+            ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "reconfiguring");
 
             cycle = ngx_init_cycle(cycle);
             if (cycle == NULL) {
@@ -233,7 +232,7 @@
 
         if (ngx_reopen) {
             ngx_reopen = 0;
-            ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "reopening logs");
+            ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "reopening logs");
             ngx_reopen_files(cycle, ccf->user);
             ngx_signal_worker_processes(cycle,
                                         ngx_signal_value(NGX_REOPEN_SIGNAL));
@@ -241,7 +240,7 @@
 
         if (ngx_change_binary) {
             ngx_change_binary = 0;
-            ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "changing binary");
+            ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "changing binary");
             ngx_new_binary = ngx_exec_new_binary(cycle, ngx_argv);
         }
 
@@ -281,7 +280,7 @@
 
         if (ngx_reconfigure) {
             ngx_reconfigure = 0;
-            ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "reconfiguring");
+            ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "reconfiguring");
 
             cycle = ngx_init_cycle(cycle);
             if (cycle == NULL) {
@@ -294,7 +293,7 @@
 
         if (ngx_reopen) {
             ngx_reopen = 0;
-            ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "reopening logs");
+            ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "reopening logs");
             ngx_reopen_files(cycle, (ngx_uid_t) -1);
         }
     }
@@ -308,7 +307,7 @@
     ngx_channel_t     ch;
     struct itimerval  itv;
 
-    ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "start worker processes");
+    ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "start worker processes");
 
     ch.command = NGX_CMD_OPEN_CHANNEL;
 
@@ -367,7 +366,7 @@
 
     return;
 
-    ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "start garbage collector");
+    ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "start garbage collector");
 
     ch.command = NGX_CMD_OPEN_CHANNEL;
 
@@ -624,7 +623,7 @@
 {
     ngx_delete_pidfile(cycle);
 
-    ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "exit");
+    ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "exit");
 
     ngx_destroy_pool(cycle->pool);
 
@@ -690,7 +689,7 @@
         if (ngx_exiting
             && ngx_event_timer_rbtree == &ngx_event_timer_sentinel)
         {
-            ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "exiting");
+            ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "exiting");
 
 
 #if (NGX_THREADS)
@@ -699,6 +698,10 @@
             ngx_wakeup_worker_threads(cycle);
 #endif
 
+            if (ngx_debug_quit) {
+                ngx_debug_point();
+            }
+
             /*
              * we do not destroy cycle->pool here because a signal handler
              * that uses cycle->log can be called at this point
@@ -711,7 +714,7 @@
         ngx_process_events(cycle);
 
         if (ngx_terminate) {
-            ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "exiting");
+            ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "exiting");
 
 #if (NGX_THREADS)
             ngx_wakeup_worker_threads(cycle);
@@ -726,7 +729,7 @@
 
         if (ngx_quit) {
             ngx_quit = 0;
-            ngx_log_error(NGX_LOG_INFO, cycle->log, 0,
+            ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0,
                           "gracefully shutting down");
             ngx_setproctitle("worker process is shutting down");
 
@@ -738,7 +741,7 @@
 
         if (ngx_reopen) {
             ngx_reopen = 0;
-            ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "reopen logs");
+            ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "reopening logs");
             ngx_reopen_files(cycle, -1);
         }
     }
@@ -1096,13 +1099,13 @@
     for ( ;; ) {
 
         if (ngx_terminate || ngx_quit) {
-            ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "exiting");
+            ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "exiting");
             exit(0);
         }
 
         if (ngx_reopen) {
             ngx_reopen = 0;
-            ngx_log_error(NGX_LOG_INFO, cycle->log, 0, "reopen logs");
+            ngx_log_error(NGX_LOG_NOTICE, cycle->log, 0, "reopening logs");
             ngx_reopen_files(cycle, -1);
         }
 
diff --git a/src/os/unix/ngx_process_cycle.h b/src/os/unix/ngx_process_cycle.h
index 16b981f..7e22da2 100644
--- a/src/os/unix/ngx_process_cycle.h
+++ b/src/os/unix/ngx_process_cycle.h
@@ -40,6 +40,7 @@
 extern sig_atomic_t    ngx_timer;
 extern sig_atomic_t    ngx_sigio;
 extern sig_atomic_t    ngx_quit;
+extern sig_atomic_t    ngx_debug_quit;
 extern sig_atomic_t    ngx_terminate;
 extern sig_atomic_t    ngx_noaccept;
 extern sig_atomic_t    ngx_reconfigure;
diff --git a/src/os/unix/ngx_solaris_sendfilev_chain.c b/src/os/unix/ngx_solaris_sendfilev_chain.c
index 4c873aa..c5b8120 100644
--- a/src/os/unix/ngx_solaris_sendfilev_chain.c
+++ b/src/os/unix/ngx_solaris_sendfilev_chain.c
@@ -62,8 +62,8 @@
 
     /* the maximum limit size is the maximum size_t value - the page size */
 
-    if (limit == 0 || limit > MAX_SIZE_T_VALUE - ngx_pagesize) {
-        limit = MAX_SIZE_T_VALUE - ngx_pagesize;
+    if (limit == 0 || limit > NGX_MAX_SIZE_T_VALUE - ngx_pagesize) {
+        limit = NGX_MAX_SIZE_T_VALUE - ngx_pagesize;
     }
 
 
diff --git a/src/os/unix/ngx_writev_chain.c b/src/os/unix/ngx_writev_chain.c
index 8f1087b..9cbcd86 100644
--- a/src/os/unix/ngx_writev_chain.c
+++ b/src/os/unix/ngx_writev_chain.c
@@ -44,8 +44,8 @@
 
     /* the maximum limit size is the maximum size_t value - the page size */
 
-    if (limit == 0 || limit > MAX_SIZE_T_VALUE - ngx_pagesize) {
-        limit = MAX_SIZE_T_VALUE - ngx_pagesize;
+    if (limit == 0 || limit > NGX_MAX_SIZE_T_VALUE - ngx_pagesize) {
+        limit = NGX_MAX_SIZE_T_VALUE - ngx_pagesize;
     }
 
     send = 0;
diff --git a/src/os/win32/ngx_win32_config.h b/src/os/win32/ngx_win32_config.h
index 79cea3f..4d0a221 100644
--- a/src/os/win32/ngx_win32_config.h
+++ b/src/os/win32/ngx_win32_config.h
@@ -114,8 +114,13 @@
 typedef uint32_t          ngx_atomic_t;
 
 
-#define TIME_T_LEN        sizeof("-2147483648") - 1
-#define OFF_T_MAX_VALUE   9223372036854775807
+#define NGX_SIZE_T_LEN          sizeof("-2147483648") - 1
+#define NGX_TIME_T_LEN          sizeof("-2147483648") - 1
+#define NGX_TIME_T_SIZE         4
+#define NGX_OFF_T_LEN           sizeof("-9223372036854775807") - 1
+#define NGX_MAX_OFF_T_VALUE     9223372036854775807
+#define NGX_SIG_ATOMIC_T_SIZE   4
+
 #define NGX_HAVE_LITTLE_ENDIAN  1
 
 #define NGX_THREADS       1