Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/os
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-04-21 19:59:36 +0400
committerIgor Sysoev <igor@sysoev.ru>2010-04-21 19:59:36 +0400
commitbfc8b78f5736eafe48432bb0d2f819b6a968b17a (patch)
tree03b939c788c73fc9847a2c95547f408bcbb0d9de /src/os
parent9c1a43e050c4824304e84c1e9ec47f54ac1ac8b6 (diff)
use non-blocking open() not to hang on FIFO files, etc.
Diffstat (limited to 'src/os')
-rw-r--r--src/os/unix/ngx_files.h1
-rw-r--r--src/os/win32/ngx_files.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/os/unix/ngx_files.h b/src/os/unix/ngx_files.h
index ccaf44a93..f41eba581 100644
--- a/src/os/unix/ngx_files.h
+++ b/src/os/unix/ngx_files.h
@@ -64,6 +64,7 @@ typedef struct {
#define NGX_FILE_OPEN 0
#define NGX_FILE_TRUNCATE O_CREAT|O_TRUNC
#define NGX_FILE_APPEND O_WRONLY|O_APPEND
+#define NGX_FILE_NONBLOCK O_NONBLOCK
#define NGX_FILE_DEFAULT_ACCESS 0644
#define NGX_FILE_OWNER_ACCESS 0600
diff --git a/src/os/win32/ngx_files.h b/src/os/win32/ngx_files.h
index 610fcd0dc..c5bb88807 100644
--- a/src/os/win32/ngx_files.h
+++ b/src/os/win32/ngx_files.h
@@ -64,6 +64,7 @@ ngx_fd_t ngx_open_file(u_char *name, u_long mode, u_long create, u_long access);
#define NGX_FILE_WRONLY GENERIC_WRITE
#define NGX_FILE_RDWR GENERIC_READ|GENERIC_WRITE
#define NGX_FILE_APPEND FILE_APPEND_DATA|SYNCHRONIZE
+#define NGX_FILE_NONBLOCK 0
#define NGX_FILE_CREATE_OR_OPEN OPEN_ALWAYS
#define NGX_FILE_OPEN OPEN_EXISTING