comparison src/core/ngx_cycle.c @ 2629:367b29612a00

Win32 appends synchronized if only FILE_APPEND_DATA and SYNCHRONIZE are set without any other flags. On the other hand, Unix requires at least the write flag to be set together with O_APPEND.
author Igor Sysoev <igor@sysoev.ru>
date Tue, 31 Mar 2009 13:52:01 +0000
parents 64a10d6b97bd
children 9e0ae986b587
comparison
equal deleted inserted replaced
2628:64a10d6b97bd 2629:367b29612a00
358 if (file[i].name.data == NULL) { 358 if (file[i].name.data == NULL) {
359 continue; 359 continue;
360 } 360 }
361 361
362 file[i].fd = ngx_open_file(file[i].name.data, 362 file[i].fd = ngx_open_file(file[i].name.data,
363 NGX_FILE_RDWR|NGX_FILE_APPEND, 363 NGX_FILE_APPEND,
364 NGX_FILE_CREATE_OR_OPEN, 364 NGX_FILE_CREATE_OR_OPEN,
365 NGX_FILE_DEFAULT_ACCESS); 365 NGX_FILE_DEFAULT_ACCESS);
366 366
367 ngx_log_debug3(NGX_LOG_DEBUG_CORE, log, 0, 367 ngx_log_debug3(NGX_LOG_DEBUG_CORE, log, 0,
368 "log: %p %d \"%s\"", 368 "log: %p %d \"%s\"",
1063 } 1063 }
1064 1064
1065 file[i].pos = file[i].buffer; 1065 file[i].pos = file[i].buffer;
1066 } 1066 }
1067 1067
1068 fd = ngx_open_file(file[i].name.data, NGX_FILE_RDWR|NGX_FILE_APPEND, 1068 fd = ngx_open_file(file[i].name.data, NGX_FILE_APPEND,
1069 NGX_FILE_CREATE_OR_OPEN, NGX_FILE_DEFAULT_ACCESS); 1069 NGX_FILE_CREATE_OR_OPEN, NGX_FILE_DEFAULT_ACCESS);
1070 1070
1071 ngx_log_debug3(NGX_LOG_DEBUG_EVENT, cycle->log, 0, 1071 ngx_log_debug3(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
1072 "reopen file \"%s\", old:%d new:%d", 1072 "reopen file \"%s\", old:%d new:%d",
1073 file[i].name.data, file[i].fd, fd); 1073 file[i].name.data, file[i].fd, fd);