delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/11/13/02:05:54

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Comment: RFC 2476 MSA function at mx18.yandex.ru logged sender identity as: ekot
Message-ID: <4376E5AC.9070400@narod.ru>
Date: Sun, 13 Nov 2005 10:05:16 +0300
From: Eugene Kotlyarov <ekot AT narod DOT ru>
Reply-To: ekot AT narod DOT ru
User-Agent: Thunderbird 1.5 (Windows/20051025)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Problem with poll function
X-IsSubscribed: yes

--------------040707000203070902050701
Content-Type: text/plain; charset=KOI8-R; format=flowed
Content-Transfer-Encoding: 7bit

Hello

   I've tried to build latest Curl on Cygwin and encountered problem reason 
of which is very nicely summarized on the following page

http://www.greenend.org.uk/rjk/2001/06/poll.html

It shows that behaviour of cygwin poll when socket is closed (fourth column 
in table) is only compatible with one old version of linux. Though curl 
developer probably will make workaround for this, maybe fix it also in 
Cygwin to avoid further problems. I've attached the patch for it.

--------------040707000203070902050701
Content-Type: text/plain;
 name="poll.cc.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="poll.cc.patch"

--- poll.cc.old	2005-11-13 09:05:20.640625000 +0300
+++ poll.cc	2005-11-13 09:05:32.312500000 +0300
@@ -119,7 +119,7 @@
 				fds[i].revents |= POLLIN;
 			      break;
 			    case 0:  /* Closed on the read side. */
-			      fds[i].revents |= POLLHUP;
+			      fds[i].revents |= (POLLHUP | POLLIN);
 			      break;
 			    default:
 			      fds[i].revents |= POLLIN;


--------------040707000203070902050701
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
--------------040707000203070902050701--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019