Mercurial > hg > nginx
comparison src/core/ngx_open_file_cache.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 | 09cab3f8d92e |
comparison
equal
deleted
inserted
replaced
2628:64a10d6b97bd | 2629:367b29612a00 |
---|---|
464 | 464 |
465 if (!of->log) { | 465 if (!of->log) { |
466 fd = ngx_open_file(name, NGX_FILE_RDONLY, NGX_FILE_OPEN, 0); | 466 fd = ngx_open_file(name, NGX_FILE_RDONLY, NGX_FILE_OPEN, 0); |
467 | 467 |
468 } else { | 468 } else { |
469 fd = ngx_open_file(name, NGX_FILE_RDWR|NGX_FILE_APPEND, | 469 fd = ngx_open_file(name, NGX_FILE_APPEND, NGX_FILE_CREATE_OR_OPEN, |
470 NGX_FILE_CREATE_OR_OPEN, NGX_FILE_DEFAULT_ACCESS); | 470 NGX_FILE_DEFAULT_ACCESS); |
471 } | 471 } |
472 | 472 |
473 if (fd == NGX_INVALID_FILE) { | 473 if (fd == NGX_INVALID_FILE) { |
474 goto failed; | 474 goto failed; |
475 } | 475 } |