diff src/core/ngx_cycle.c @ 120:e85dca77c46a NGINX_0_3_7

nginx 0.3.7 *) Feature: the "access_log" supports the "buffer=" parameter. *) Bugfix: nginx could not be built on platforms different from i386, amd64, sparc и ppc; bug appeared in 0.3.2.
author Igor Sysoev <http://sysoev.ru>
date Thu, 27 Oct 2005 00:00:00 +0400
parents 408f195b3482
children df17fbafec8f
line wrap: on
line diff
--- a/src/core/ngx_cycle.c
+++ b/src/core/ngx_cycle.c
@@ -724,6 +724,12 @@ ngx_reopen_files(ngx_cycle_t *cycle, ngx
             continue;
         }
 
+        if (file[i].buffer && file[i].pos - file[i].buffer != 0) {
+            ngx_write_fd(file[i].fd, file[i].buffer,
+                         file[i].pos - file[i].buffer);
+            file[i].pos = file[i].buffer;
+        }
+
         fd = ngx_open_file(file[i].name.data, NGX_FILE_RDWR,
                            NGX_FILE_CREATE_OR_OPEN|NGX_FILE_APPEND);