summaryrefslogtreecommitdiff
path: root/src/os/unix
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2006-05-04 15:28:28 +0000
committerJonathan Kolb <jon@b0g.us>2006-05-04 15:28:28 +0000
commit6b7826e8137eadd4ad978b248c4163b26e102b87 (patch)
tree6385f521eb5ffefc5032e95a1d0fcd9d3c9689fb /src/os/unix
parent052afaa36d327993532eaef2427841d12ad6c8af (diff)
downloadnginx-6b7826e8137eadd4ad978b248c4163b26e102b87.tar.gz
Changes with nginx 0.3.44 04 May 2006v0.3.44
*) Feature: the "wait" parameter in the SSI "include" command. *) Feature: the Ukrainian and Byelorussian characters were added to koi-win conversion table. *) Bugfix: in the SSI.
Diffstat (limited to 'src/os/unix')
-rw-r--r--src/os/unix/ngx_socket.c2
-rw-r--r--src/os/unix/ngx_socket.h5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/os/unix/ngx_socket.c b/src/os/unix/ngx_socket.c
index 60885ddd5..a93679f64 100644
--- a/src/os/unix/ngx_socket.c
+++ b/src/os/unix/ngx_socket.c
@@ -10,7 +10,7 @@
/*
* ioctl(FIONBIO) sets a blocking mode with the single syscall
- * while fcntl(F_SETFL, ~O_NONBLOCK) needs to learn before
+ * while fcntl(F_SETFL, !O_NONBLOCK) needs to learn before
* the previous state using fcntl(F_GETFL).
*
* ioctl() and fcntl() are syscalls at least in FreeBSD 2.x, Linux 2.2
diff --git a/src/os/unix/ngx_socket.h b/src/os/unix/ngx_socket.h
index b381967e6..9e6a859bb 100644
--- a/src/os/unix/ngx_socket.h
+++ b/src/os/unix/ngx_socket.h
@@ -29,9 +29,12 @@ int ngx_blocking(ngx_socket_t s);
#else
-#define ngx_nonblocking(s) fcntl(s, F_SETFL, O_NONBLOCK)
+#define ngx_nonblocking(s) fcntl(s, F_SETFL, fcntl(s, F_GETFL) | O_NONBLOCK)
#define ngx_nonblocking_n "fcntl(O_NONBLOCK)"
+#define ngx_blocking(s) fcntl(s, F_SETFL, fcntl(s, F_GETFL) & ~O_NONBLOCK)
+#define ngx_blocking_n "fcntl(!O_NONBLOCK)"
+
#endif
int ngx_tcp_nopush(ngx_socket_t s);