summaryrefslogtreecommitdiffhomepage
path: root/auto/os/linux
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2013-07-12 14:51:07 +0400
committerValentin Bartenev <vbart@nginx.com>2013-07-12 14:51:07 +0400
commit182a05b9d5b4321be89aa25ade89e41d00f0b4f7 (patch)
tree6732cf547663b6f5d0ac6154a27876fc3771ca91 /auto/os/linux
parent0f0502064dda4e702b4f379ee2af4bbddcb93214 (diff)
downloadnginx-182a05b9d5b4321be89aa25ade89e41d00f0b4f7.tar.gz
nginx-182a05b9d5b4321be89aa25ade89e41d00f0b4f7.tar.bz2
Events: support for EPOLLRDHUP (ticket #320).
Since Linux 2.6.17, epoll is able to report about peer half-closed connection using special EPOLLRDHUP flag on a read event.
Diffstat (limited to '')
-rw-r--r--auto/os/linux16
1 files changed, 16 insertions, 0 deletions
diff --git a/auto/os/linux b/auto/os/linux
index c0391d98e..19bf832ce 100644
--- a/auto/os/linux
+++ b/auto/os/linux
@@ -65,6 +65,22 @@ if [ $ngx_found = yes ]; then
CORE_SRCS="$CORE_SRCS $EPOLL_SRCS"
EVENT_MODULES="$EVENT_MODULES $EPOLL_MODULE"
EVENT_FOUND=YES
+
+
+ # EPOLLRDHUP appeared in Linux 2.6.17, glibc 2.8
+
+ ngx_feature="EPOLLRDHUP"
+ ngx_feature_name="NGX_HAVE_EPOLLRDHUP"
+ ngx_feature_run=no
+ ngx_feature_incs="#include <sys/epoll.h>"
+ ngx_feature_path=
+ ngx_feature_libs=
+ ngx_feature_test="int efd = 0, fd = 0;
+ struct epoll_event ee;
+ ee.events = EPOLLIN|EPOLLRDHUP|EPOLLET;
+ ee.data.ptr = NULL;
+ epoll_ctl(efd, EPOLL_CTL_ADD, fd, &ee)"
+ . auto/feature
fi