Mercurial > hg > nginx-quic
comparison src/core/ngx_open_file_cache.c @ 3595:8944c3e318ab stable-0.7
merge r3498, r3499:
opening files fixes:
*) use non-blocking open() not to hang on FIFO files, etc.
*) do not log misleading errno in "not a regular file" error
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 07 Jun 2010 12:08:44 +0000 |
parents | d65ba5392f59 |
children |
comparison
equal
deleted
inserted
replaced
3594:8a5106c2a377 | 3595:8944c3e318ab |
---|---|
485 goto done; | 485 goto done; |
486 } | 486 } |
487 } | 487 } |
488 | 488 |
489 if (!of->log) { | 489 if (!of->log) { |
490 fd = ngx_open_file(name, NGX_FILE_RDONLY, NGX_FILE_OPEN, 0); | 490 |
491 /* | |
492 * Use non-blocking open() not to hang on FIFO files, etc. | |
493 * This flag has no effect on a regular files. | |
494 */ | |
495 | |
496 fd = ngx_open_file(name, NGX_FILE_RDONLY|NGX_FILE_NONBLOCK, | |
497 NGX_FILE_OPEN, 0); | |
491 | 498 |
492 } else { | 499 } else { |
493 fd = ngx_open_file(name, NGX_FILE_APPEND, NGX_FILE_CREATE_OR_OPEN, | 500 fd = ngx_open_file(name, NGX_FILE_APPEND, NGX_FILE_CREATE_OR_OPEN, |
494 NGX_FILE_DEFAULT_ACCESS); | 501 NGX_FILE_DEFAULT_ACCESS); |
495 } | 502 } |