1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 15:48:49 -05:00

Thanks to this nice summary of poll() implementations:

http://www.greenend.org.uk/rjk/2001/06/poll.html and further tests by Eugene
Kotlyarov, we now know that cygwin's poll returns only POLLHUP on remote
connection closure so we check for that case (too) and re-enable poll for
cygwin builds.
This commit is contained in:
Daniel Stenberg 2005-11-13 09:24:06 +00:00
parent 8a712eb5af
commit c2862742ab
4 changed files with 11 additions and 4 deletions

View File

@ -8,6 +8,13 @@
Daniel (13 November 2005)
- Thanks to this nice summary of poll() implementations:
http://www.greenend.org.uk/rjk/2001/06/poll.html and further tests by Eugene
Kotlyarov, we now know that cygwin's poll returns only POLLHUP on remote
connectin closure so we check for that case (too) and re-enable poll for
cygwin builds.
Daniel (12 November 2005) Daniel (12 November 2005)
- Eugene Kotlyarov found out that cygwin's poll() function isn't doing things - Eugene Kotlyarov found out that cygwin's poll() function isn't doing things
right: http://curl.haxx.se/mail/archive-2005-11/0045.html so we now disable right: http://curl.haxx.se/mail/archive-2005-11/0045.html so we now disable

View File

@ -18,7 +18,7 @@ This release includes the following changes:
This release includes the following bugfixes: This release includes the following bugfixes:
o don't use poll() on cygwin, it is defective o fixed libcurl's use of poll() on cygwin
o the GnuTLS code didn't support client certificates o the GnuTLS code didn't support client certificates
o TFTP over IPv6 works o TFTP over IPv6 works
o no reverse lookups on IP addresses when ipv6-enabled o no reverse lookups on IP addresses when ipv6-enabled

View File

@ -1591,10 +1591,10 @@ AC_CHECK_DECL(basename, ,
#endif #endif
) )
AC_MSG_CHECKING([if we are Mac OS X or cygwin to disable poll]) AC_MSG_CHECKING([if we are Mac OS X (to disable poll)])
disable_poll=no disable_poll=no
case $host in case $host in
*-*-darwin* | *-*-cygwin) *-*-darwin*)
disable_poll="yes"; disable_poll="yes";
;; ;;
*) *)

View File

@ -104,7 +104,7 @@ int Curl_select(curl_socket_t readfd, curl_socket_t writefd, int timeout_ms)
ret = 0; ret = 0;
num = 0; num = 0;
if (readfd != CURL_SOCKET_BAD) { if (readfd != CURL_SOCKET_BAD) {
if (pfd[num].revents & POLLIN) if (pfd[num].revents & (POLLIN|POLLHUP))
ret |= CSELECT_IN; ret |= CSELECT_IN;
if (pfd[num].revents & POLLERR) if (pfd[num].revents & POLLERR)
ret |= CSELECT_ERR; ret |= CSELECT_ERR;