nginx-0.0.2-2004-02-10-19:23:38 import
diff --git a/src/core/nginx.c b/src/core/nginx.c
index 34f204f..005417c 100644
--- a/src/core/nginx.c
+++ b/src/core/nginx.c
@@ -203,6 +203,15 @@
         ccf->pid.data = NGINX_PID;
         ccf->newpid.len = sizeof(NGINX_NEW_PID) - 1;
         ccf->newpid.data = NGINX_NEW_PID;
+
+    } else {
+        ccf->newpid.len = ccf->pid.len + sizeof(NGINX_NEW_PID_EXT);
+        if (!(ccf->newpid.data = ngx_alloc(ccf->newpid.len, cycle->log))) {
+            return 1;
+        }
+
+        ngx_memcpy(ngx_cpymem(ccf->newpid.data, ccf->pid.data, ccf->pid.len),
+                   NGINX_NEW_PID_EXT, sizeof(NGINX_NEW_PID_EXT));
     }
 
     len = ngx_snprintf(pid, /* STUB */ 10, PID_T_FMT, ngx_getpid());
@@ -785,7 +794,7 @@
         }
     }
 
-    if (cycle->conf_file.len == NULL) {
+    if (cycle->conf_file.data == NULL) {
         cycle->conf_file.len = sizeof(NGINX_CONF) - 1;
         cycle->conf_file.data = NGINX_CONF;
     }
@@ -814,6 +823,7 @@
     /* set by pcalloc()
      *
      * ccf->pid = NULL;
+     * ccf->newpid = NULL;
      */
     ccf->daemon = NGX_CONF_UNSET;
     ccf->master = NGX_CONF_UNSET;
diff --git a/src/core/nginx.h b/src/core/nginx.h
index 99423d3..eb7fe93 100644
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -2,19 +2,20 @@
 #define _NGINX_H_INCLUDED_
 
 
-#define NGINX_VER      "nginx/0.0.2"
-#define NGINX_CONF     "nginx.conf"
-#define NGINX_PID      "nginx.pid"
-#define NGINX_NEW_PID  NGINX_PID ".newbin"
+#define NGINX_VER          "nginx/0.0.2"
+#define NGINX_CONF         "nginx.conf"
+#define NGINX_PID          "nginx.pid"
+#define NGINX_NEW_PID_EXT  ".newbin"
+#define NGINX_NEW_PID      NGINX_PID NGINX_NEW_PID_EXT
 
-#define NGINX_VAR      "NGINX="
-#define NGINX_VAR_LEN  (sizeof(NGINX_VAR) - 1)
+#define NGINX_VAR          "NGINX="
+#define NGINX_VAR_LEN      (sizeof(NGINX_VAR) - 1)
 
-extern ngx_module_t    ngx_core_module;
+extern ngx_module_t        ngx_core_module;
 
-extern ngx_uint_t      ngx_connection_counter;
+extern ngx_uint_t          ngx_connection_counter;
 
-extern ngx_int_t       ngx_process;
+extern ngx_int_t           ngx_process;
 
 
 #endif /* _NGINX_H_INCLUDED_ */
diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c
index e0b24fa..1157484 100644
--- a/src/core/ngx_connection.c
+++ b/src/core/ngx_connection.c
@@ -243,14 +243,14 @@
     ngx_int_t  level;
 
     if (err == NGX_ECONNRESET
-        && c->read->log_error == NGX_ERROR_IGNORE_ECONNRESET)
+        && c->log_error == NGX_ERROR_IGNORE_ECONNRESET)
     {
         return 0;
     }
 
     if (err == NGX_ECONNRESET || err == NGX_EPIPE || err == NGX_ENOTCONN) {
 
-        switch (c->read->log_error) {
+        switch (c->log_error) {
 
         case NGX_ERROR_INFO:
             level = NGX_LOG_INFO;
diff --git a/src/core/ngx_connection.h b/src/core/ngx_connection.h
index 6f87fd2..835f5e1 100644
--- a/src/core/ngx_connection.h
+++ b/src/core/ngx_connection.h
@@ -52,6 +52,14 @@
 } ngx_listening_t;
 
 
+typedef enum {
+     NGX_ERROR_CRIT = 0,
+     NGX_ERROR_ERR,
+     NGX_ERROR_INFO,
+     NGX_ERROR_IGNORE_ECONNRESET
+} ngx_connection_log_error_e;
+
+
 struct ngx_connection_s {
     void             *data;
     ngx_event_t      *read;
@@ -84,6 +92,8 @@
 
     ngx_int_t         number;
 
+    unsigned          log_error:2;  /* ngx_connection_log_error_e */
+
     unsigned          pipeline:1;
     unsigned          unexpected_eof:1;
     signed            tcp_nopush:2;