diff src/core/ngx_cycle.c @ 571:458b6c3fea65 release-0.3.7

nginx-0.3.7-RELEASE import *) Feature: the "access_log" supports the "buffer=" parameter. *) Bugfix: nginx could not be built on platforms different from i386, amd64, sparc, and ppc; the bug had appeared in 0.3.2.
author Igor Sysoev <igor@sysoev.ru>
date Thu, 27 Oct 2005 15:46:13 +0000
parents 9c2f3ed7a247
children 4d9ea73a627a
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);