summaryrefslogtreecommitdiff
path: root/src/fdevent.h
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2016-08-06 04:11:16 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2016-08-06 04:28:45 -0400
commit4bc06bfc0b72b92c67f21ac0dc7de7d67be73728 (patch)
tree39a0984eaf1ed53e0ebbd9be55b83881b97d012a /src/fdevent.h
parent1de652f40badac2d2c6c3f4d348b8c35635519e1 (diff)
downloadlighttpd-git-4bc06bfc0b72b92c67f21ac0dc7de7d67be73728.tar.gz
[core] check if client half-closed TCP if POLLHUP (#2743)
Check if client half-closed TCP connection if POLLHUP is received. This more robustly handles if client called shutdown(fd, SHUT_WR). This patch reverts commit:ab05eb7c which should now be handled properly. (Time will tell.) x-ref: "1.4.40/41 mod_proxy, mod_scgi may trigger POLLHUP on *BSD,Darwin" https://redmine.lighttpd.net/issues/2743
Diffstat (limited to 'src/fdevent.h')
-rw-r--r--src/fdevent.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/fdevent.h b/src/fdevent.h
index cab04291..4dc1d3cc 100644
--- a/src/fdevent.h
+++ b/src/fdevent.h
@@ -214,4 +214,7 @@ int fdevent_solaris_port_init(fdevents *ev);
int fdevent_freebsd_kqueue_init(fdevents *ev);
int fdevent_libev_init(fdevents *ev);
+/* fd must be TCP socket (AF_INET, AF_INET6), end-of-stream recv() 0 bytes */
+int fdevent_is_tcp_half_closed(int fd);
+
#endif