Mercurial > hg > nginx
comparison src/core/ngx_open_file_cache.c @ 3497:ac281bc4c187
use non-blocking open() not to hang on FIFO files, etc.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 21 Apr 2010 15:59:36 +0000 |
parents | 975f0558aab3 |
children | e7cd13b7f759 |
comparison
equal
deleted
inserted
replaced
3496:fb88801564de | 3497:ac281bc4c187 |
---|---|
488 goto done; | 488 goto done; |
489 } | 489 } |
490 } | 490 } |
491 | 491 |
492 if (!of->log) { | 492 if (!of->log) { |
493 fd = ngx_open_file(name, NGX_FILE_RDONLY, NGX_FILE_OPEN, 0); | 493 |
494 /* | |
495 * Use non-blocking open() not to hang on FIFO files, etc. | |
496 * This flag has no effect on a regular files. | |
497 */ | |
498 | |
499 fd = ngx_open_file(name, NGX_FILE_RDONLY|NGX_FILE_NONBLOCK, | |
500 NGX_FILE_OPEN, 0); | |
494 | 501 |
495 } else { | 502 } else { |
496 fd = ngx_open_file(name, NGX_FILE_APPEND, NGX_FILE_CREATE_OR_OPEN, | 503 fd = ngx_open_file(name, NGX_FILE_APPEND, NGX_FILE_CREATE_OR_OPEN, |
497 NGX_FILE_DEFAULT_ACCESS); | 504 NGX_FILE_DEFAULT_ACCESS); |
498 } | 505 } |