mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user