delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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 |
Date: | Tue, 28 Jan 2003 08:44:51 +0200 |
Message-Id: | <200301280644.h0S6ipG21454@hki-web-1.sunpoint.net> |
To: | cygwin AT cygwin DOT com |
Subject: | bug: select() for sockets returned by accept() returns always ready for write (sel.always_ready 1) |
From: | Risto Virkkala <risto DOT virkkala AT sunpoint DOT net> |
Hi, I am using non-blocking sockets in a small server software. Select() seems to indicate that sockets returned by accept() are always ready for write. This causes 99% cpu usage since the socket gets always selected as writeable and after that write returns EAGAIN and again we go to the select(). After looking select.cc fhandler.cc fhandler_socket.cc I think that the reason could be that in fhandler_socket::accept the socket is not set to CONNECTED state and in fhandler_socket::select_write sets write_ready if socket is in unconnected state. (uname -a CYGWIN_NT-5.0 O1400031 1.3.19(0.71/3/2) 2003-01-23 21:31 i686 unknown unknown Cygwin) - Risto - Sunpoint tiedottaa: Puhelintuki numerossa 0600-10 900 1,83E/min+pvm Tutustu myös Etätukeen tästä http://www.sunpoint.net/SunAds/click.htm?mode=footer&id=70&jump=http%3A%2F%2Fwww.pilotvastauspalvelu.fi%2Fdefault.asp%3Fsivu%3D3 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |