comparison auto/os/linux @ 5372:36b58ddb566d

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.
author Valentin Bartenev <vbart@nginx.com>
date Fri, 12 Jul 2013 14:51:07 +0400
parents acd51b0f6fd4
children adba26ff70b5
comparison
equal deleted inserted replaced
5371:b95e70ae6bcd 5372:36b58ddb566d
63 if [ $ngx_found = yes ]; then 63 if [ $ngx_found = yes ]; then
64 have=NGX_HAVE_CLEAR_EVENT . auto/have 64 have=NGX_HAVE_CLEAR_EVENT . auto/have
65 CORE_SRCS="$CORE_SRCS $EPOLL_SRCS" 65 CORE_SRCS="$CORE_SRCS $EPOLL_SRCS"
66 EVENT_MODULES="$EVENT_MODULES $EPOLL_MODULE" 66 EVENT_MODULES="$EVENT_MODULES $EPOLL_MODULE"
67 EVENT_FOUND=YES 67 EVENT_FOUND=YES
68
69
70 # EPOLLRDHUP appeared in Linux 2.6.17, glibc 2.8
71
72 ngx_feature="EPOLLRDHUP"
73 ngx_feature_name="NGX_HAVE_EPOLLRDHUP"
74 ngx_feature_run=no
75 ngx_feature_incs="#include <sys/epoll.h>"
76 ngx_feature_path=
77 ngx_feature_libs=
78 ngx_feature_test="int efd = 0, fd = 0;
79 struct epoll_event ee;
80 ee.events = EPOLLIN|EPOLLRDHUP|EPOLLET;
81 ee.data.ptr = NULL;
82 epoll_ctl(efd, EPOLL_CTL_ADD, fd, &ee)"
83 . auto/feature
68 fi 84 fi
69 85
70 86
71 # O_PATH and AT_EMPTY_PATH were introduced in 2.6.39, glibc 2.14 87 # O_PATH and AT_EMPTY_PATH were introduced in 2.6.39, glibc 2.14
72 88